A proposal that has nothing to do with const

BCS ao at pathlink.com
Sun Dec 9 15:09:39 PST 2007


Reply to Jason,

> BCS wrote:
> 
>> it occurred to me that it would be
>> hand to have a way to say "this type may not be assigned to a
>> variable
>> outside of this code".
>
> I usually view scope in this way...  If a variable is passed into
> functions as a scope, it can't use it past the end of the function
> call.
> 

I don't think that is strong enough. You can still declare a variable of 
that type in any code that can get access to something of that type. If the 
type can be returned to you, than you can return it your self.





More information about the Digitalmars-d mailing list