2 ms·
I've condensed the relative source code sizes and notes for quick ref: Rust_1 1.0 using recursive descent, visitor Haskell 1.0-1.6x depending on how you c
by karmakaze 7y ago
I've condensed the relative source code sizes and notes for quick ref:
Rust_1 1.0 using recursive descent, visitor
Haskell 1.0-1.6x depending on how you count for interesting reasons
C++ 1.4x for mundane reasons
Python 0.5x fancy metaprogramming, dynamic typing, single author
Rust_2 3x different design decisions
Scala 0.7x LR table generator, online Java grammar
OCaml 1.0-1.6x depending on how you count, similar to Haskell
> AST visitors and recursive descent [...] weren’t taught in the course
- karmakaze 7y agoLooking at this, my takeaways are different: Similar implementations in Rust(1) and C++ are roughly the same Similar implementations in Haskell and OCaml are roughly the same A similar implementation in Rust(2) to one in Haskell/OCaml is roughly 2x-3x Don't underestimate dynamic typing, metaprogramming, and individual effectiveness But for real world, long lived projects I still promote static typing with the exception of startup development (MVP/product validation, early iterations) of new product ideas.