3 ms·
It's not a dumb take at all. I have been using Rust for > 6 years now. A significant portion of my projects don't benefit strongly from the borrow checker (the
by shpongled 3y ago
It's not a dumb take at all. I have been using Rust for > 6 years now. A significant portion of my projects don't benefit strongly from the borrow checker (the other ones massively do). I use Rust primarily because it has a solid type system, functional bent, and - most importantly - phenomenal tooling (cargo, rust-analyzer), package ecosystem, and developer UX.
If OCaml/StandardML/Haskell/etc had anything close to the ergonomics and convenience of cargo for testing, setting up projects, adding deps, deploying them to any OS/platform, I would probably write about 30-40% less Rust.
I'm not saying we should add GC to Rust - but I think there is space for a Rust+GC language (or just improved ecosystem and tooling for other functional langs)
- pjmlp 3y agoLike opam and stackage?
- shpongled 3y agoI'm familiar with both - but not really the same order of magnitude. crates.io lists >120k packages. opam has ~4500, and stackage ~3000. And the package ecosystem is only part of it. Admittedly, I haven't written any OCaml or Haskell in the last year or so, but my experience of just getting a new library or executable up and running isn't comparable to cargo either. But also hard to separate my strong familiarity with Rust from the comparison.
- pjmlp 3y agoQuality matters more than quantity. I rather have one package that does it right, than 20 doing a different set of 80% from what is needed.
- shpongled 3y agoWho wouldn't. But let's not pretend that stackage and crates.io are covering the same functionality space. As just one example: there are no OCaml or Haskell packages for natively reading or writing parquet files. There are at least 2 such packages for Rust.
- pjmlp 3y agoYeah, yet it doesn't matter to me, I don't even know what they are about. Likewise, despite crates.io, Rust is missing lots of stuff I miss from Java, C# and C++. Plenty of stuff isn't there yet.
- bheadmaster 3y ago> If OCaml/StandardML/Haskell/etc had anything close to the ergonomics and convenience of cargo for testing, setting up projects, adding deps, deploying them to any OS/platform, I would probably write about 30-40% less Rust. Ahem... Excuse me, sir, do you have time to talk about our lord and savior Robert Pike?
- shpongled 3y ago> solid type system Politely closes door in your face
- bheadmaster 3y agoI personally enjoy working with Go's type system even more than Rust's. For example, implicit interfaces make code reuse much easier than Rust's traits.
- shpongled 3y agoLack of sum types is complete deal-breaker for me unfortunately.
- bheadmaster 3y agoThere's a proposal, for what it's worth: https://github.com/golang/go/issues/57644 https://github.com/golang/go/issues/57644 Although I'm curious, what is your use case that cannot be fulfilled by interfaces, but can with sum types?
- shpongled 3y ago`if err != nil` is the easiest example. Sum types allow you to express type-level OR. Structs/tuples etc are AND (product types). I like to be able to use both OR and AND at both the expression and type level.