From the D Blog: Crafting Self-Evident Code in D

Walter Bright newshound2 at digitalmars.com
Thu Oct 26 03:39:19 UTC 2023


On 10/8/2023 6:21 AM, sighoya wrote:
> I have another thing to add. You argued about reasons not to use macros but 
> these reasons don't apply to AST Macros, they won't allow constructing new 
> languages like in Lisp or in Neat.
> 
> Typed AST Macros would only accept parseable D source code with correct typing 
> while untyped AST Macros would relax typing issues but syntax is still valid D.

It's still inventing one's own undocumented, incomprehensible language.

 > Scala

I've heard from an expert insider source that Scala macros destroyed the language.

Macros are like selling your soul to the devil. At first it's a honeymoon, which 
may last for a decade or more, but eventually you discover you're in a trap you 
cannot escape.

Seeing the life cycle of macros over and over is one advantage to me having been 
programming for well over 40 years.


More information about the Digitalmars-d-announce mailing list