5 ms·
> It's a qualitative statement and disingenuous. Complex relative to what? Complex relative to most programming languages. C++ is more complex. That says very
by seagreen 7y ago
> It's a qualitative statement and disingenuous. Complex relative to what?
Complex relative to most programming languages.
C++ is more complex. That says very little. C++ is an extreme outlier.
I think Haskellers do a disservice to people they're trying to convince to do haskell by saying it's not complex. Haskell has a zillion extensions and crazy features, most of which show up in at least some popular Hackage libraries. Arrow syntax! Type families! Data kinds! Pattern synonyms! View patterns! Existential types! Rank-N types! The list goes on and on.
PS: I think Haskell is awesome and one of the best languages out there. I've written a pretty decent amount of FOSS haskell stuff. Complex doesn't mean bad.
EDIT: The complexity doesn't come just through language extensions. The process GHC goes through to produce fast code is crazy too. It works, but it's not simple.
- agentultra 7y agoCool, I like Haskell a fair bit too. It took a long time to get here. I don't think it's the perfect language but I agree that it is probably much better than most other languages out there. I'm hoping that languages built on dependent types like Lean will eventually come to the main stream. I see your point about doing a disservice. It is a tricky thing trying to convince people to adopt a language like Haskell that is so different from everything else they've likely used. If you say it's easy they're probably going to stop inviting you to dinner. I think it's equally a disservice to tell people it's too complex to learn. There's a common impression people get that they have to master category theory before they can begin to understand Haskell code. That's also troubling and kind of what I was getting at with this whole thing in a round-about-way. Take a post about a dead simple Ruby + Sinatra application. You'd still expect a developer to learn classes, messages, methods, types, modules and probably rake or foreman or something. It's pretty complicated but not insurmountable. TFA uses one language extension. The libraries are roughly similar in size to the APIs exposed by Sinatra. Many of the concepts port over. But because it's written in Haskell it's somehow too complex and can't be simple? I make no bones about Haskell being difficult to learn. However I don't think that makes it a complex language. In C++ I have to learn about constructors, intialization lists, and all of the ways that move semantics make it extremely complicated to make the language do what I want. Haskell may be hard to learn but once you get over the initial hump it scales well and is rather simple in many ways.
- seagreen 7y ago> I think it's equally a disservice to tell people it's too complex to learn. There's a common impression people get that they have to master category theory before they can begin to understand Haskell code. That's also troubling and kind of what I was getting at with this whole thing in a round-about-way. Ah, I see where you're coming from more now. Yes, the "category theory is recommended alongside learning haskell" meme is terrible. In that context saying Haskell is simple is an improvement. I think people can handle nuance though, and "haskell has a simple core, but in practice GHC haskell is a big language" is something they can handle.
- Ericson2314 7y agoYou are still wrong, dispite your disclaimers. Haskell has a tiny core language, which neatly breaks apart complexity. Most mainstream languages don't, which makes them far harder to thoroughly understand. there's no way easy to know what complexity is essential, and what can be reduced away. Abstractions are rather informal, and likely to leak.
- seagreen 7y agoYour argument is that a language with a 750,000 line implementation and a zillion features is simple because one of its IRs is simple? Doesn't seem very convincing.
- danharaj 7y agoHaskell2010's definition is like 20 pages long and that includes the definition of the standard library. This core accounts for 90-99% of the code in project that isn't going out of its way to use fancy features for the lulz.
- seagreen 7y agoName me a single company that uses Haskell 2010. It's completely irrelevant. But I'll leave you to argue with Vitaly Bragilevsky (speaking at Galois): "Haskell is a big language" -- https://galois.com/blog/2018/11/teaching-haskell-in-the-real-world/ https://galois.com/blog/2018/11/teaching-haskell-in-the-real... Or Paul Hudak, Philip Wadler, and Simon Peyton Jones: "Haskell is a big language" -- https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/history.pdf https://www.microsoft.com/en-us/research/wp-content/uploads/... (p.28) Maybe those guys know something. It's cool Haskell goes through a small IR. That doesn't make TH, rewrite rules, CPP, the million extensions, STG, the runtime, the gigantic syntax, or the quarter million SLOC implementation simple.
- deleted 7y ago[deleted]
- UserIsUnused 7y agoYou are confusing language with ecosystem. If you we are talking language only, only lisps are simpler.