3 ms·
> This comes with downsides around dicking around with trying to jam every part of the computation into the type system (not unlike C++ template meta programmin
by jcelerier 5y ago
> This comes with downsides around dicking around with trying to jam every part of the computation into the type system (not unlike C++ template meta programming)
doing this my whole career has completely, 100% percent been an upside. This removes literally entire classes of bugs. Every time I've moved some check from run-time to compile-time I ended up finding so many cases that were subtly broken and that the compiler will now catch perfectly, until the end of time. I don't understand how it is sane to accept bugs that are automatically preventable.
- benreesman 5y agoYeah I mean there’s definitely a guns and butter curve here: hoisting stuff into templates and using either old-school traits or concepts gets you more compile-time checking (though I’d argue you’re still going to get more from a good static analyzer, which clang-tidy-13 is). But at some point build times matter. At some point L1i spills matter. At some point TLB spills matter. I don’t think it’s a knob we should always crank to 11.