Non-enum manifest constants: Pie in the sky?

2009-11-24 Thread Nick Sabalausky
I don't suppose there's any chance that ugly design will be getting cleaned up for D2 is there? Or maybe at least potentially on the table for D3?

Re: Non-enum manifest constants: Pie in the sky?

2009-11-24 Thread Jason House
Nick Sabalausky Wrote: > I don't suppose there's any chance that ugly design will be getting cleaned > up for D2 is there? Or maybe at least potentially on the table for D3? I'm with you, but you have quite an uphill battle. Both Andrei and Walter love it. IMHO, enum is a patchwork collection

Re: Non-enum manifest constants: Pie in the sky?

2009-11-24 Thread bearophile
Jason House: > IMHO, enum is a patchwork collection of features... manifest constants, > enumerated lists, and bitmasks are all conflated into something rather ugly.< Manifest constants defined with enum look a little ugly, and I too don't like it, but it's not even a syntax problem, it's a nam

Re: Non-enum manifest constants: Pie in the sky?

2009-11-24 Thread yigal chripun
bearophile Wrote: > Jason House: > > > IMHO, enum is a patchwork collection of features... manifest constants, > > enumerated lists, and bitmasks are all conflated into something rather > > ugly.< > > Manifest constants defined with enum look a little ugly, and I too don't like > it, but it's

Re: Non-enum manifest constants: Pie in the sky?

2009-11-25 Thread Nick Sabalausky
"bearophile" wrote in message news:heiaea$1oc...@digitalmars.com... > Jason House: > >> IMHO, enum is a patchwork collection of features... manifest constants, >> enumerated lists, and bitmasks are all conflated into something rather >> ugly.< > > Manifest constants defined with enum look a lit

Re: Non-enum manifest constants: Pie in the sky?

2009-11-25 Thread bearophile
Nick Sabalausky: > rename > the current "const" to "readonly" (since that's what it *really* is anyway, > the current "const" is nearly as poorly-named as the current "enum"), and > then change "enum" to "const". I like something like that. There's another couple of proposals. Let's see if Wa

Re: Non-enum manifest constants: Pie in the sky?

2009-11-25 Thread Nick Sabalausky
"bearophile" wrote in message news:hej7tb$k2...@digitalmars.com... > Nick Sabalausky: > >> 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

Re: Non-enum manifest constants: Pie in the sky?

2009-11-25 Thread bearophile
Nick Sabalausky: > then attempting to evaluate > blahExpression at compile-time (which I believe it already does) and if it > succeeds, then treat it as a manifest constant in any place where it's used > (except for the places where it's pointer or reference is taken). I think this is not so e

Re: Non-enum manifest constants: Pie in the sky?

2009-11-25 Thread Leandro Lucarella
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;" synta

Re: Non-enum manifest constants: Pie in the sky?

2009-11-25 Thread retard
Wed, 25 Nov 2009 09:29:10 -0500, bearophile wrote: > Nick Sabalausky: > >> then attempting to evaluate >> blahExpression at compile-time (which I believe it already does) and if >> it succeeds, then treat it as a manifest constant in any place where >> it's used (except for the places where it's