DMD 1.005 release

Sean Kelly sean at f4.ca
Tue Feb 6 09:01:02 PST 2007


Walter Bright wrote:
> BLS wrote:
>> I guess here is a need for further explaination.
>>
>> Either I am an complete idiot (not completely unrealistic) and 
>> missunderstood something, or a new, quit radical, programming 
>> paradigmn change is on it s way.  I mean it is difficult to realize 
>> the implications.
> 
> I think you're right. The only thing that makes me uneasy is the 
> "preprocessor abuse" that comes up in C++. We should be careful in how 
> we use this, lest the cuticle side of the thumb take over.

The most obvious danger is simply being able to eyeball what the source 
code for a module actually is, but that's been an issue for any 
sufficiently complex template code anyway.  What I like about this 
feature is that it improves upon the power of macros but does so without 
providing a method for changing the meaning of existing symbols (the 
"#define if while" problem).  It also requires almost no new language 
features, so it shouldn't have a tremendous learning curve.  Finally, 
since all this works via strings, it should be easy to determine what's 
actually going on simply by tossing in a few pragma(msg) statements.  If 
there were a way to emit the "expanded" source we could even use this as 
a "standalone" code generation tool of sorts.  Nice work!


Sean



More information about the Digitalmars-d-announce mailing list