4 ms·
This feels unnecessarily snarky. If you wanna write in Haskell, use Haskell. Rust is a different beastie with different use cases. There's no reason why any lan
by kortex 5y ago
This feels unnecessarily snarky. If you wanna write in Haskell, use Haskell. Rust is a different beastie with different use cases. There's no reason why any language shouldn't benefit from a powerful type system if they can manage it.
- ReleaseCandidat 5y ago> There's no reason why any language shouldn't benefit from a powerful type system if they can manage it. There actually is. If you mix too many low- and high-level (abstract) features you get something like C++. Apart from that, Rust already takes _long_ to compile. I do _not_ want to solve Haskell-problems in Rust or Rust-problems in Haskell.
- gpderetta 5y ago> If you mix too many low- and high-level (abstract) features you get something like C++ you say that as if it were a bad thing!
- ReleaseCandidat 5y agoNobody would use Rust if it weren't. To be fair, a subset of C++20 ist fine by me, but that's not the sort of C++ I'm dealing with (for more than 15 years). Or to put it in other words: C++ isn't suitable for most of the people writing C++ code (except everybody 'posting in the internet' of course).
- kortex 5y agoHence "if it they can manage it". The tradeoffs you mention is exactly what I mean. GATs/HKTs are really pushing the envelope for the Rust type system, GATs being slightly more tractable and much closer to reality (soon!) than HKTs. But I don't think HKTs are a bridge too far for Rust. Maybe I'm wrong about that. Or GATs will appease the FP crowd enough (and it'll be hard enough) that there won't be enough drive for HKTs. But I agree you shouldn't be "writing Haskell in Rust". https://blog.rust-lang.org/2021/08/03/GATs-stabilization-push.html https://blog.rust-lang.org/2021/08/03/GATs-stabilization-pus...