Conditional compilation inside asm and enum declarations

Walter Bright newshound1 at digitalmars.com
Tue Jul 14 17:02:35 PDT 2009


Bill Baxter wrote:
> You do realize you're being patronizing, right?  "I have so much
> experience with these things, and I know the right way to write code,
> and you don't, so I'm not going to give you this thing you request
> because it's not good for you".

Sure. There's some of that in every language. They all have some feature 
or other rejected because the designers, be they individuals or 
committees, considered such features as encouraging bad practice.

Even C++ has this. Why do you think doing | operations on pointers is 
illegal? It's certainly not a limitation on compiler technology, and 
there certainly are legitimate uses for it. But the designers felt that 
was an execrable practice that should be banned.

The resumption exception handling model for C++ was rejected because it 
was felt such encouraged bad practices.

> Also note that despite D's limitations supposedly making things
> better, you just got through describing how parts of Phobos turned
> into a mess anyway.

It's not as good as I would like it to be, but it's also not near as bad 
with conditional compilation as other libraries I've dealt with.


> So not only do the little missing capabilities annoy people who would
> use them judiciously, they also apparently don't have the desired
> outcome of eliminating poor use of conditional compilation.  Sounds
> like something you would find in a patronizing nanny-language to me.
> Which is odd, because D isn't like that, overall.

Rather than interpret it as patronizing, I ask you to try it my way for 
a while. Give it a fair shake.

Note that D *still has* conditional compilation, and there are no plans 
to remove it.



More information about the Digitalmars-d mailing list