reflection based on my experience so far on compile-time meta-programming in D as a novice user: the problems

mw mingwu at
Mon Sep 14 20:25:36 UTC 2020

On Monday, 14 September 2020 at 20:03:09 UTC, H. S. Teoh wrote:
> does BF. So what?  I wouldn't wish to write *anything* in 
> lambda calculus.  Or BF.  Lots of things are Turing-complete; 
> that says nothing about their usefulness.  (Though if you wish

The point I want to make is: all the supposed high level fancy D 
mechanisms are too complex to use (or may not even made to work 
at all, I'm not sure).

The safe bet so far is: go back to raw string manipulation, and 
*keep* the generated code, to be read by human (for inspection) 
and compiled by the compiler in the 2nd pass.

As to the tool for the such string manipulation: it can be:
-- C preprocessor,
-- Python script, or
-- D string interpolation (can I save the generated code?).

More information about the Digitalmars-d mailing list