Extended Type Design.

Andrei Alexandrescu (See Website For Email) SeeWebsiteForEmail at erdani.org
Fri Mar 16 11:02:39 PDT 2007


Dan wrote:
> I think if we properly use 'const' to define something as 'not
> moving', and 'final' to define something as being 'unchangeable' then
> you can declare final const x and be done with it.
> 
> The simpler the language is, the better.

Simplistic does not mean simpler. Your system would be unable to express 
the simplest realities:

void print(const char[] message); // not modifying message

void main()
{
   char[] myMessage = readln();
   print(myMessage); // error! myMessage is changeable!
}

I truly think we've distilled the simplest language within our requirements.

Andrei



More information about the Digitalmars-d mailing list