3 ms·
It depends on what we mean by Haskell. If we mean "Haskell the latest specification" that's Haskell 2010. I suppose we could think of it as pretty simple, thou
by seagreen 7y ago
It depends on what we mean by Haskell.
If we mean "Haskell the latest specification" that's Haskell 2010. I suppose we could think of it as pretty simple, though lazy evaluation means that any implementation of it is going to be complicated.
However I don't know of a single company that uses plain Haskell 2010. They all use GHC (or more complex tools like GHCJS!) and GHC Haskell is a beast: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html https://downloads.haskell.org/~ghc/latest/docs/html/users_gu...
- lalaithion 7y agoAnd how many companies use a C++ standard? GCC and Clang both provide a large number of extensions. https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/C-Extensions.html#C-Extensions https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/C-Extensions.ht... https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/C_002b_002b-Extensions.html#C_002b_002b-Extensions https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/C_002b_002b-Ext...
- seagreen 7y agoOP: haskell is extremely complex. Responder: not it's not (eg C++ is more complex) Me: actually haskell is a complex, beastly language, eg check out the language extensions You: but C++ is more complex! Me: i agree EDIT: Didn't mean to sound snarky, the discussion has just gotten really layered and I wanted to explain my position.
- agentultra 7y agoFair enough there are some combinations of compiler extensions that don't interact well and I've written enough type level code to know which ones to stay away from. The C++ move semantics are standard though and have lots of unintended consequences to make easy-to-describe constructors incredibly difficult to implement in practice. My point was that saying Haskell is extremely complex is not technically correct. It's a qualitative statement and disingenuous. Complex relative to what? The stack the OP is presenting is relatively simple in the Haskell space. It's not inherently complex by virtue of being written in Haskell.
- 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.
- mark_l_watson 7y agoFirst, that was a nice article. Second, I agree with you that Haskell does not have to be too complicated. I only ever use a few language extensions, I use a subset of the language, and try to do repl oriented development. The downside of my simple approach is that reading other people’s code takes real effort because I am likely to not understand many of the idioms and techniques that other people use. Programming should be fun and productive, and it is up to everyone to figure out what works for them.
- seagreen 7y agoWe're on the exact same page :) I even think there's a place for fancy Haskell, but I think people reach for it a little too often.