DMD 1.025 and 2.009 releases

Jason House jason.james.house at gmail.com
Wed Jan 2 07:55:24 PST 2008


John Reimer Wrote:
> I wager these are the 4 ways to do manifests that Walter was referring 
> to in earlier posts: invariant, const, named enum, and anonymous enum - 
> the last being the "true" manifest constant.  That's why he felt he 
> shouldn't have to add another keyword to replace the anonymous enum 
> version if he could just stretch enum a bit more at the seams. 
> (incidentally, notice that the four ways still exist).
> 
> But are these four ways equivalent and the link level?  I don't think 
> so. My question is whether this "type" of manifest constant takes up any 
> symbol space in the program...you know: the way the libraries used to 
> get bloated with D's old constants (something that seemed to 
> circumvented with anonymous enums).  Do all these consts (when used like 
> manifests) truly mirror the weightless "#define".  I think only the 
> "enum" version does...unless the compiler is indeed smart enough here.
> 
> But yes, the docs do tend to mix things up a little.

That's really my whole point.  There's plenty of room for confusion and assumptions when reading the docs.  I feel like I keep posting stuff like "please add this to the docs", or "please clarify this in the docs".  Being a developer, I understand the pain of documentation, but it truly is important... especially for D when there's lots of people (like me) who refuse to use D 2.x until they're convinced the design is both sane and stable.  Actually, I might hold off on porting my code until the Tango + Phobos merger is (nearly?) complete.



More information about the Digitalmars-d-announce mailing list