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

sighoya sighoya at gmail.com
Sun Oct 8 13:24:00 UTC 2023


On Sunday, 8 October 2023 at 13:21:12 UTC, sighoya wrote:
> On Monday, 2 October 2023 at 17:28:19 UTC, Mike Parker 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.

A good reference to compare are Scala Macros: 
https://docs.scala-lang.org/scala3/guides/macros/macros.html

Also Swift Macros: 
https://docs.swift.org/swift-book/documentation/the-swift-programming-language/macros/


More information about the Digitalmars-d-announce mailing list