const

Georg Wrede georg at nospam.org
Mon Mar 31 11:44:17 PDT 2008


Jason House wrote:
> Janice Caron Wrote:
>> 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!
> 
> As is the normal problem with picking keywords, you can't find one
> that everyone universally likes.  Outside of function arguments, I
> don't like the use of the word "in".  It also seems to assume that in
> meaning "const scope" is going away.  I'm hoping that's not true, but
> I guess we'll see...

I agree.

With parameter lists, "in" seems appropriate for two reasons, neither of 
which apply outside of them:

  - Parameter lists are crowded as it is. A long word instead of "in" 
would exacerbate this unduely, and make it harder to see "at a glance" 
what's going on.

  - In does retain some of its English meaning there.


Now, everywhere else, the latter meaning seems irrelevant.

It could also be argued that "in" is too short to spot (which of course 
is excusable in parameter lists), and an important thing such as 
constness should really be denoted with something more conspicuous and 
deliberate.

So, "in" outside of parameter lists is as relevant as id, ud, da, no, 
on, it, cc, etc...

And saving keywords as an excuse, I'd rather count such as a 
counter-argument!



More information about the Digitalmars-d mailing list