ACLs for variables - lock / unlock idea

Cecil Ward d at
Fri Sep 29 11:12:32 UTC 2017

An idea, I’d be interested to hear if this might be at all useful 
to anyone -

If and only if a variable is declared as modifiable (neither 
immutable nor const), would it possibly be useful to be able to 
have a kind of scope const on/off switch to either impose const 
within a block, and/or the converse, that is to impose const as 
the default everywhere starting say from an initial directive 
straight after the (modifiable) declaration, while being able to 
flick the const protection switch off within a block?

More information about the Digitalmars-d mailing list