DMD 1.039 and 2.023 releases

Michel Fortin michel.fortin at michelf.com
Sat Jan 17 02:26:33 PST 2009


On 2009-01-16 22:17:57 -0500, Daniel Keep <daniel.keep.lists at gmail.com> said:

> The '#' has a nice connotation for anyone who's used to C/C++, given
> that those statements are handled at "compile time."  The problem, of
> course, is that they're really nothing like C preprocessor statements.
> They have a different syntax, and completely different capabilities.
> What's more, you can't mix them across statements/expressions, so I
> suspect it would just cause more confusion.
> 
> Additionally, there's this:
> 
>    #endif
> 
> Unless you plan on moving all control structures to BASIC/pascal style,
> I don't think it's wise to start mixing them all over the place.

All good reasons, but there is one more:

If you use #if in the standard D language, then it'll make it harder to 
use a real C preprocessor when you need it. D has support for #line in 
the language so that the compiler gives you error messages relative to 
the right included file and line in a preprocessor output. D doesn't 
have a preprocessor built-in, and doesn't recommand using one either, 
but it has support for it. Introducing #if in the D language would 
break that support.


> I do like the idea of a "scopeless block" syntax in theory, though it's
> not something that's really been an issue for me.

Me neither.


-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d-announce mailing list