4 ms·
From what I understand, C++ can do anything! But sadly, it lets you do anything. Haskell restricts what you can do hugely. But also lets you accomplish a whol
by deckiedan 10y ago
From what I understand, C++ can do anything! But sadly, it lets you do anything.
Haskell restricts what you can do hugely. But also lets you accomplish a whole lot within what it thinks of as safety.
I like Haskell - but think it's really just a playground for trying how far functional purity can be pushed, rather than being the actual best version of that paradigm.
Probably in 10-20 years time there will be a language around which takes all those concepts and comes together as a really pleasant unsurprising friendly developer experience. Maybe it'll come from slow evolution of Haskell... stack helps a lot, and a whole bunch of GHC extensions... but it's still got a lot of very impractical elements and hangovers from the past that really need to go.
- acchow 10y agoDepends what you mean by anything. You have dependent types and subtyping, but can't express, say, a GADT. I think Scala can probably do anything. I agree that Haskell is probably not great for writing real world code and should be reserved for toying with ideas about PL and type theory.
- silluk 10y agoIt's a far cry from Haskell but I've found Rust's type system to be a breath of fresh air coming from C++. Stuff like destructuring assignment and matching on enums (or anything really) while not as powerful as their equivalents in Haskell, are still much nicer than what you can do in C++.