Non-enum manifest constants: Pie in the sky?
Leandro Lucarella
llucax at gmail.com
Wed Nov 25 07:31:48 PST 2009
bearophile, el 25 de noviembre a las 07:28 me escribiste:
> > Another good idea is like yigal said, just improve the optimizer so that any
> > immutables whose value is known at compile-time ends up effectively being
> > treated as a manifest constant. Then rip out enum's "enum x = 7;" syntax and
> > be done with it.
>
> One not written rule of D design seems to be that it must require
> a simple and low-tech compiler. That's the only explanation I see for
> some of the D design decisions that look silly if you think about having
> a good compiler under it.
OTOH, there is no virtual or inline keywork, so it's a little
contradictory about this :P
I think the specs are just too tied to DMD's capabilities, it's not that
it requires a particularly dumb or smart compiler.
--
Leandro Lucarella (AKA luca) http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
22% of the time a pizza will arrive faster than an ambulance in Great-Britain
More information about the Digitalmars-d
mailing list