Const sucks
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Mon Sep 10 16:48:54 PDT 2007
Russell Lewis wrote:
> Walter Bright wrote:
> > (snip)
>> o static const/invariant means the initializer is evaluated at
>> compile time. non-static const/invariant means it is evaluated at run
>> time.
>
> I'd like to suggest that we use some keyword other than "static." Yeah,
> I know that "static" can imply "static analysis" (compile time), but the
> static modifier on a variable has a well-known meaning from C: it's not
> exported. I think that that was a poor design choice in C, but now
> we're stuck with millions of programmers who expect it.
>
No one cares (or at least, should care) what that means in C. That's
ancient history. More important is the other meaning that 'static' in *D
itself*: the meaning of "non-instance / unique" which is really
unrelated to "compile-time".
--
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d
mailing list