CTTI is Exponential, RTTI is Linear

11 points by clerno


snej

Not a compiler expert, but: you can fix some of the code bloat with type erasure; that's what C++'s std::format does.

I am not that sympathetic to complaints about compile time. I hate long builds too, but everything is tradeoffs, and if something's gotta give, compile time is the least worst thing. The end user does not give a fsck how long your program took to build. They do care about size and performance.

clerno

While C3 has quite a lot of CTTI available, I constantly encourage people to not use it too much. Even having a way to force inline functions can easily create hard-to-debug binary bloat. It's easy to write a lot of code that you don't see, and that's the problem.

One note: good error reporting is definitely a problem, but not completely intractable: C3 solves this by pushing checks to contracts while Jai allows compiler errors inside of functions to be reported as if they happened in a particular context outside of the function.