IDEA: Use Unix-style chmod values for const and invariant

Regan Heath regan at netmail.co.nz
Fri Nov 30 01:16:12 PST 2007


Janice Caron wrote:
> On Nov 29, 2007 10:51 PM, Jesse Phillips <jessekphillips at gmail.com> wrote:
>> In my opinion invariant
>> is a great keyword for what it does, don't ever change. But const like
>> others is very much not descriptive of its use. I would think the two
>> keywords should be,
>>
>> readonly ## which since keywords aren't usually 2, ro?
>> invariant
>>
>> I'm not saying a name change is needed but maybe it should be looked into?
> 
> Has anyone thought of using "in" for readonly view? Keywords don't
> come much shorter. Its existing use is about as useful as unary plus.

We already use it for function parameters...

http://www.digitalmars.com/d/function.html
"The in storage class is equivalent to final const scope"

:)

R



More information about the Digitalmars-d mailing list