4 ms·
The C++ implementation, sure. But there is plenty of other implementation space without giving up like Java. With a trait-first implementation that mostly defe
by o11c 11mo ago
The C++ implementation, sure. But there is plenty of other implementation space without giving up like Java.
With a trait-first implementation that mostly defers monomorphization and prefers "static if" over C++-style specialized implementations, the only hard choice is whether to optimize codegen for size or speed.
Trying to retrofit this onto standard C++ is ... not actually as difficult as you might think. The real problem is the implementation of builtins that rely heavily on "this really must be a constant during X phase of compilation".