const, final, scope function parameters

Myron Alexander someone at somewhere.com
Sun May 27 12:30:28 PDT 2007


janderson wrote:
> Walter Bright wrote:
>> 2) Having to turn off one of the const, final, or scope, introduces 
>> the need for some sort of "not" keyword, like mutable, !const, !final, 
>> etc. It comes off looking bizarre.
> 
> On this point, couldn't it be something like, if you define const, final 
> or scope then the default "const final scope" is removed?
> 
> [snip]

I agree with this suggestion. I always insist on the most restrictions 
possible and relaxing restrictions on a case-by-case basis. This is what 
I call tight code :)

I understand scope within the function body but I do not understand 
scope for parameters. How does scope affect class references, arrays, 
and primitives (like int)?

Regards,

Myron.



More information about the Digitalmars-d mailing list