CTFE and Wasm

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sat Apr 30 07:08:48 UTC 2022


I understand why both D and C++ users make a fuzz about CTFE, it 
gives them a feeling of being able to extend the type system or 
language in a way they are used to. However they are still at wn 
disadvantage to more powerful languages that allow construction 
of new types at runtime and do CTFE as an optimization.

Reason 1: compilation performance.
Reason 2: poor debugging tooling.

I'd say you don't have a proper CTFE solution until you can set 
breakpoints in all functions and see what goes on.

One possibility is to reuse WASM infrastructure by compiling CTFE 
functions to WASM and use source maps for debugging.

What do you think?




More information about the Digitalmars-d mailing list