reflection based on my experience so far on compile-time meta-programming in D as a novice user: the problems
mingwu at gmail.com
Mon Sep 14 19:42:58 UTC 2020
On Monday, 14 September 2020 at 19:31:04 UTC, Steven
> On Monday, 14 September 2020 at 18:30:16 UTC, mw wrote:
>> On Monday, 14 September 2020 at 18:20:02 UTC, Steven
>> Schveighoffer wrote:
>>> // this would be easier with string interpolation!
>>> , D has far superior string manipulation capabilities.
>> Basically, your solution is: let's just use strings! (forget
>> about of all the other fancy mechanism I've listed in point
>> Yes, that's right: source code should just be strings.
>> From that point of view, C-preprocessor is conceptually at a
>> high level.
> This is hilariously backwards. The c preprocessor is literally
> just pasting strings around.
When we manually type code, we are literally just pasting strings
C preprocessor automates some parts of that job.
... and sometimes can even do very fancy things:
"this entry _is_ a Turing machine implemented in the preprocessor"
More information about the Digitalmars-d