Why is D unpopular?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sat May 14 06:39:00 UTC 2022


On Saturday, 14 May 2022 at 06:24:15 UTC, Ola Fosheim Grøstad 
wrote:
> You need to do the macro expansion in the lexer, then inject 
> C/D context switch tokens used by the parser, then you inject 
> C/D AST nodes if there are semantic differences, or annotate 
> AST nodes with the differences. That way you can have a C 
> signature followed by a D body.

Technically it migh be better to not use context switch tokens, 
but instead reserve a bit in the token to distinguish between C 
and D. Then the parser can swallow either one where there are no 
semantic differences. These are details though...


More information about the Digitalmars-d mailing list