3 ms·
As proven by other languages with similar type systems and faster compile times, Rust's case is a matter of tooling, not language features.
by pjmlp 2y ago
As proven by other languages with similar type systems and faster compile times, Rust's case is a matter of tooling, not language features.
- _flux 2y agoNot sure if that's really a proof, as it could be the exact combination of language features that makes up the slowness. For example traits, non-ordered definitions in compilation units and monomorphization probably don't help. GHC also isn't a speed demon for compilation. But sure, LLVM and interfacing with it is quite possibly a big contributor to it.
- pjmlp 2y agoHaskell isn't the only language around with complex type systems. However, it is actually a good example regarding tooling, as the Haskell ecosystem has interpreters and REPL environments available, for quick development and prototyping, something that is yet to be common among Rustaceans.
- neonsunset 2y agoRust has Cranelift: https://cranelift.dev https://cranelift.dev
- pjmlp 2y agoIndeed, but its compile times aren't much better than LLVM, at least one year ago. Ideally we would be having the F# REPL/JIT, plus Native AOT for deployment, as comparable development workflow experience. Naturally F# was chosen as example, because that's your area. :) Not being negative per se, I also would like to have something like Haskell GHCi, or OCaml bytecode compiler, as options on rustup, so naturally something like this might eventually come.
- burnished 2y agoBased on a first hand account I read (but cannot source offhand) Rust's slow compiles are because anytime there was a tradeoff involving compile time at the expense of something else they'd always choose that something else. Not cause they hated fast compilation, guess it just wasn't high on their priorities.