3 ms·
> and if we pretend we can't hear the Haskell developers it's one of the best type systems out there Eh, Rust's type system isn't one of the best out there. It
by elcritch 2y ago
> and if we pretend we can't hear the Haskell developers it's one of the best type systems out there
Eh, Rust's type system isn't one of the best out there. It's lacking higher kinded types, etc. It's abilities in type level programming are frustratingly limited as well.
So it's advanced aside from from Haskell, OCaml, Idris, Scala, etc. Compare to OCaml's effect system for an advanced type system feature.
- kelnos 2y agoI 100% agree with you (I really miss HKTs), but I don't think the GP was using "best" to mean "most fully-featured". And with that in mind, I do agree with the GP. Scala's type system, for example, is full of warts (well, Scala 2; I still haven't tried Scala 3). Rust's is cleaner and has fewer gotchas. I very rarely have to look up how to express something in Rust's type system, but I remember when I last did Scala, I often ran into weird type-system related errors that I just didn't understand and had to dig into to figure out. Some of that, sure, is likely due to Scala's type system having more features, but some of that is because it's just more complex. And I would usually rate something of lower complexity as better than something with higher complexity.
- Quekid5 2y agoOne of the major things about Scala 2 vs Scala 3 is the removal of many of the type system warts, in particular the type hierarchy now forms a lattice (if I'm getting my terminology right) rather than being rather adhoc in various places. Lots of other small annoyances like the whole tuple situation have also been fixed. EDIT: Plus: intersection types, sane macros/inlining, etc. Unfortunately (for me), some of our projects still have to cross-compile to 2.x, but that's irrelevant for greenfield. I'd give it a whirl -- it's a great improvement over Scala 2.x.
- satvikpendem 2y agoOCaml's effects are fairly new, and the Rust maintainers are also looking into effect systems. Who knows, we might also get HKTs and dependent types too in the future.
- deleted 2y ago[deleted]