const

Simen Kjaeraas simen.kjaras at gmail.com
Mon Mar 31 11:29:56 PDT 2008


On Mon, 31 Mar 2008 15:20:41 +0200, Janice Caron <caron800 at googlemail.com>  
wrote:

> On 31/03/2008, Jason House <jason.james.house at gmail.com> wrote:
>> Maybe rov or read.
>
> Again, "readable" doesn't imply "not writeable". (It is perfectly
> possible for a thing to be both readable and writeable at the same
> time).
>
> Let's just stick with "in". It's /already implemented/ in one of the
> places where it's needed, and let's face it, keywords don't get much
> shorter!

I have to say I really dislike 'in'. It's ok in a function parameter list,  
but
what the hell is 'in(int)' supposed to look like? It certainly does not  
tell me
anything about constancy (until I look it up, of course. But one should not
depend on everyone looking up things all the time. Most people just want  
to sit
down and program, not read manuals).

'const' and 'invariant' really are fine keywords to me, if the latter  
somewhat long.
My only gripe with the current const system is 'enum', and I fear that  
will stay.
'pure', 'manifest', 'alias'... all those are great. But that's not really  
the topic
at hand.

--Simen



More information about the Digitalmars-d mailing list