4 ms·
Yes, I'd too prefer HKT in Rust. And a GC. And getting rid of all those superfluous braces, parens and semicolons. And instead of 'Rust' (WTF?) we could name it
by ReleaseCandidat 5y ago
Yes, I'd too prefer HKT in Rust. And a GC. And getting rid of all those superfluous braces, parens and semicolons. And instead of 'Rust' (WTF?) we could name it after a mathematician - why not e.g. Moses? :D
- gpderetta 5y agoYou could add lazy evaluation and call your language Curry.
- ReleaseCandidat 5y agoOh yes, I forgot about that!
- choeger 5y agoSchönfinkel, please.
- sargstuff 5y ago3pt iterators called Steph would be more interesting, but that'd be beyond the arc of this thread.
- kortex 5y agoThis 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...