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

Bill Baxter dnewsgroup at billbaxter.com
Thu Nov 29 23:42:07 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.

Or how about 'is'?  Or 'do'?  Those are pretty short too!

I think it hasn't been suggested because it doesn't jump out at anyone 
as meaning 'const' anywhere besides on a function parameter.

--bb



More information about the Digitalmars-d mailing list