DIP 50 - AST macros

SomeDude lovelydear at mailmetrash.com
Sun Nov 17 00:18:58 PST 2013


On Thursday, 14 November 2013 at 22:06:06 UTC, deadalnix wrote:
>
> mymacro(4+3); // <= can be "hello"
> myfunction(4+3); // <= can be "hello as well"
>
> Quite frankly, this isn't really convincing.
>

True but you will hardly use myfunction as an extension to the 
language.

If I understand the issues, I quite understand Walter's 
reluctance to add such a feature. Once you add it, you add the 
capability to change the language, or to create an entirely new 
language. If you let it, no matter how loud you cry, people 
*will* abuse the feature, and they will do it from day one. The 
C++ templates experiment shows what happens when you do that. We 
don't want to repeat the same mistakes.

Basically, people want to change the language, but without having 
to discuss their own extensions in the newsgroups. It's sometimes 
handy, but you'll end up with crappy features all over the place.


More information about the Digitalmars-d mailing list