Open source dmd on Reddit!

Nick Sabalausky a at a.a
Fri Mar 6 21:54:30 PST 2009


"dsimcha" <dsimcha at yahoo.com> wrote in message 
news:got0ff$28r4$1 at digitalmars.com...
> == Quote from grauzone (none at example.net)'s article
>>
>> String mixins are awful in the first place. The only thing that could
>> save this kind of thing are AST macros.

Both Murphey's law and the law of D bitfields dictate that we're all going 
to end up hating AST macros when they finally show up ;)

>
> ????????????? String mixins are an absolute godsend.  I mean really, how 
> much more
> general a metaprogramming facility could you possibly ask for than the 
> ability to
> generate arbitrary D code at compile time?  Of course they can get ugly, 
> so there
> should be better ways to do things that are done frequently (regular 
> templates
> accomplish this), but last I checked, bit fields are not an everyday
> run-of-the-mill programming type of feature.
>
> As a more general comment, of course syntax and readability count for 
> frequently
> used features, but there's only so much pretty syntax available, and 
> simplicity of
> the core language is a virtue.  If certain things in D are going to have 
> ugly
> syntax, they may as well be niche features like bit fields.

My thought is that it's absolutely great to have string mixins, but they 
should never be thought of as anything more than a clumbsy substitute 
(athough notably less clumbsy than a preprocessor macro) for a real language 
feature to accomplish the same task (or possibly an AST macro). 




More information about the Digitalmars-d-announce mailing list