From 4989974268865990655
X-Google-Thread: f78e5,a76a320bf483dfd6
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: andre@ba-z.co.jp (Andre Caldas)
Newsgroups: comp.std.c++
Subject: Re: Proposal: new keywords: freeze | unfreeze | hide | unhide | forget
 <varname>[, ...]
Date: Fri,  8 Apr 2005 02:06:08 GMT
Organization: Aioe.org NNTP Server
Lines: 22
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <d34kat$o2k$2@domitilla.aioe.org>
References: <d34h2n$ia4$00$1@news.t-online.com>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.demon.co.uk 1112925979 23533 158.152.254.254 (8 Apr 2005 02:06:19 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Fri, 8 Apr 2005 02:06:19 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: Debian Thunderbird 1.0 (X11/20050116)
X-Accept-Language: en-us, en
X-Virus-Scanned: by amavisd-new at cs.mu.OZ.AU
X-Path: comp-std-cpp-robomod!not-for-mail
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id j38268ak004146;
	Fri, 8 Apr 2005 12:06:08 +1000 (EST)
X-NNTP-Posting-Date: Fri, 8 Apr 2005 00:47:26 +0000 (UTC)
X-Delivered-To: std-c++@ucar.edu
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
Xref: g2news1.google.com comp.std.c++:4447

> It would be useful if the language had the following additions:
> 
> 1) "freeze" (and "unfreeze")  varname, ...
>      to freeze a variable's current content, that is to make it
>      constant for the rest of the function (or upto an "unfreeze"
>      within the same function).
>      (volatile variables shall still be changable from other locations).
> 
> 2) "hide" (and "unhide") varname, ...
*snip*
> 3) "forget" varname, ...
*snip*
> This would help making programs more robust.

Write smaller functions and your program will be more robust.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



