Re:Reducing Rust Incremental Compilation Times on macOS
by Tyr42 on Sunday April 18, 2021 @03:30PM
(#26855540)
I agree somewhat, in Haskell you can write generic functions without traits, and I think they are not monomorphized. (map for example.)
However, I think these all operate on boxed objects, which is a little bit easier to do than for Rust, where only some objects are boxed.
In short, I agree.
I think the real reason is that rust gives additional guarantees about lack of allocation and object layout that are hard to implement with dictionary passing (BitC tried and failed).