Either I'm just too stupid, or D is lacking something

Don Clugston dac at nospam.com.au
Fri Jul 28 05:39:57 PDT 2006


Wolfgang Draxinger wrote:
> Chris Nicholson-Sauls wrote:
> 
>> Personally I don't think '$' having other uses would be a
>> problem, as this usage is pretty
>> distinct.  Also, while I'm not sure if '#' is the best choice
>> for your proposal, I do
>> agree that its something I'd love to see.  There have been a
>> few times where I'd had to resort to tricks like the "named
>> mixin + aliases" style, or ended up just copy-pasting whole
>> sections of code and sighing a lot, especially if something
>> changes.

To follow several other languages...
identifier(str)

creates an identifier called 'str', and is intended for dealing with
keyword conflicts. If str was allowed to be a compile-time string
literal, you could do practically *anything*. Easy enough to implement.
BUT...
The problem is, it would be practically impossible for an IDE to deal with.
(although, maybe that's true already).

> Yes, I think D is not ready for becomming version 1.0 until there
> are no sophisticated metaprogramming facilities. I hate to admit
> it, but on this topic D is lacking something C++, err no the C
> preprocessor provides. Without strong metaprogramming D is
> not "ready for combat ;-)" with C++.

LOL!
D metaprogramming leaves C++ for dead. This is one of the few things
that C++ can do (with a hack!) that D can't; but there are far more
things that D can do, that C++ can't.

Check out my meta.nameof module in DDL on dsource.




More information about the Digitalmars-d mailing list