DIP 1027---String Interpolation---Format Assessment

Walter Bright newshound2 at digitalmars.com
Mon Feb 24 19:35:16 UTC 2020


Having the compiler lower string interpolation to some hidden template is - AST 
macros. We're not doing AST macros.

Hidden user-defined semantics are not for D. Every language I'm familiar with 
that supports it wound up with users creating their own completely undocumented 
personal language that nobody else can use or has the remotest interest in using.

Including me.

Exhibit A: https://www.boost.org/doc/libs/1_72_0/libs/preprocessor/doc/index.html

Everyone agrees, but says "but I know how to do AST macros in a sane way." 
They're wrong.

If someone sees an i"abc" in the source code, they should be able to look in the 
language spec and know exactly what it does. They should not have to go trolling 
through imports looking for the definition of some template they never heard of.


More information about the Digitalmars-d-announce mailing list