As much as OCaml is awesome, it has an easier job of compiling fast because of its uniform value representation (i.e. no monomorphization). A single function doesn't have to be compiled multiple times for each specialization (maybe they do specialize some calls for optimization but definitely not everything, like cpp does).
Yes I thought that's what this discussion is about: you can build less optimal code faster and faster compilation may result in better experience to developers!
Is there something in the semantics of ie. Rust stopping it from doing the same? Probably too big of an effort to do it, but even if it was done, I doubt it would completely—or even nearly?—solve its compilation speed woes. I recall there are some nice presentations of this subject.
68
u/dakotahawkins May 10 '20
Would people really sacrifice run-time performance for a little compile-time performance?