Topic: Proposal: new keywords: freeze | unfreeze | hide | unhide | forget <varname>[, ...]
Author: "Uenal Mutlu" <520001085531-0001@t-online.de>
Date: Fri, 8 Apr 2005 01:53:32 +0200 Raw View
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, ...
to make a variable hidden, ie. not accessible for the rest
of the current function (or upto an "unhide" within the same
function).
3) "forget" varname, ...
to forget a variable, ie. to remove it from the list.
This would help making programs more robust.
Author: stkim@yujinrobot.com ("Kim, Seungtai")
Date: Fri, 8 Apr 2005 02:06:19 GMT Raw View
"Uenal Mutlu"
> It would be useful if the language had the following additions:
.
> This would help making programs more robust.
What is the benefit by making it as the Standard? You can show it to us as
the killer examples.
--
S Kim <stkim@yujinrobot.com>
---
[ 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 ]
Author: ark@acm.org ("Andrew Koenig")
Date: Fri, 8 Apr 2005 18:50:27 GMT Raw View
"Uenal Mutlu" <520001085531-0001@t-online.de> wrote in message
news:d34h2n$ia4$00$1@news.t-online.com...
> It would be useful if the language had the following additions:
Why?
Can you show us some examples of how you would use your proposed features if
you had them?
---
[ 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 ]
Author: "sal" <smangano@siac.com>
Date: Sat, 9 Apr 2005 15:29:54 CST Raw View
Andre Caldas wrote:
> > 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
]
I'd also like to add:
expose/unexpose varname
- to take make private member variables public and visa versa
no-throw/yes-throw funcname
- to turn on and off execption handling
threads-on/threads-off varname
- to make variable access thread safe or not
and most importanatly
wax-on/wax-off varname
-to make vraibles slippery (or not) so they forget their values if you
don't use then in a specified time
These additions will help make C++ so much more complicated that I can
increase my consulting rates!
---
[ 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 ]