4 ms·
In D which has CTFE support since ages, you'd debug such functions by invoking them at runtime. https://tour.dlang.org/tour/en/gems/compile-time-function-evalua
by dawg 9y ago
In D which has CTFE support since ages, you'd debug such functions by invoking them at runtime.
https://tour.dlang.org/tour/en/gems/compile-time-function-evaluation-ctfe https://tour.dlang.org/tour/en/gems/compile-time-function-ev...
There are also tools to print values at compile time.
A compile time debugger for the CTFE interpreter is on our extended feature list for the current interpreter rewrite, but it's less of a priority atm.
- deleted 9y ago[deleted]
- ben-schaaf 9y agoSadly it's fairly easy to write a function that fails at compile time but runs fine at runtime. For those situations there's at least `pragma(msg,`