Conditional compilation inside asm and enum declarations
Walter Bright
newshound1 at digitalmars.com
Tue Jul 14 10:01:44 PDT 2009
Bill Baxter wrote:
> But from where I sit it looked like Walter didn't really convince
> anyone. To me this seems like a point where D is overly patronizing,
> to use the phrase from a recent post.
You could argue that, but it also took a long time to convince many
about the merit of const and immutable. I understand that C style
versioning is so seductive, it's very hard to see what's wrong with it.
(For another reason against such, I could send you some of the source to
optlink. It's chock full of line by line versioning, nested versioning,
a couple dozen version arguments, it's so bad the only way I can tell
what's going on is to compile it then *disassemble* it to see what the
code actually is.)
Contrast that with the dmd front end source where I've made a concerted
effort (not 100% yet) to remove #ifdef's.
And I didn't even touch on what would have to happen if versioning could
slice anywhere - it would have to be done as a separate pre-pass. It
couldn't be integrated in to the current one-pass parser, and would do a
fine job of screwing up syntax highlighters and pretty-printers much
like C's preprocessor can.
More information about the Digitalmars-d
mailing list