Deep learning, for example, has opened the door to some pretty incredible advances, I'm astonished monthly at least by what people are accomplishing. Stuff that's getting close to the uncanny valley.
I see equally smart people enraptured with Haskell. And, maybe it's just over my head, but so far no practical advance is apparent. To me at least. So, for the sake of the nonbelievers, it would be grand to share some of the hopes that merit the great energies that go into languages like Haskell.
(ps. thanks to Scrollaway for asking, below)
In general terms, Haskell has an unparalleled ability to be both precise and flexible at the same time. At least, that's why I like it.
But, if I look at Deep Learning, I see a freight train to the future. If I look at Haskell, I see a lot of... well, debating about... things.. well I just don't see where it's going. I get the sense that it's a gleeful little clever club that exists as an alternative to doing actual work.
And, where's the counterexample, Haskell is a freight train to where? What's the future that Haskell brings?
This is really a sincere question. I've been programming long enough to feel the limitations of existing tools. But, will humans even be coding in 30 years?
I mean, I understand /why/, but sometimes I really longed for a blunt instrument.
That being said, Haskell has been at the forefront of programming language research since its inception in the 1980s. It may be more academic kind of advances but things have trickled down to mainstream languages, e.g. F# and C# have had influences from Haskell (particularly because Simon Peyton-Jones is employed by Microsoft Research). Scala and other languages have had some influence too. Things such as Parser combinators have emerged from the Haskell world and have been adopted to many programming languages since.
Haskell is exciting because it takes a no-compromises approach to the paradigm it is based on. It's purely functional and lazy, something not taken to such extremes in any prior languages. Whether this is the right(tm) approach to take is open to debate.
If I had to summarize in one sentence: Haskell is a research language that is practical - learning it will make you a better programmer even if you never get the opportunity to use it in your day job.
The advantages appear to be limited to highly complex functional code (i.e. big black boxes of code without side effects). IIRC facebook has a spam filter written using it.
Since most of the industry involves code where the functional aspect isn't all that complex and the side effects are, the practical advances aren't all that relevant for a lot of people.
Except, perhaps, for the impact Haskell is having on other more mainstream languages' design.
You do realize that system you described - Facebook's Sigma - is a real-time, massively concurrent online spam-fighting system, that automatically and implicitly makes your code concurrent for all operations, can optimize it, and has automated caching/batching request mechanisms in place to talk to external systems (Graph databases, SQL, cache servers) in an optimal way while reducing things like round tripping, with naive code? (e.g. it can automagically parallelize and optimize the "N+1 Query Problem" into an efficient query that minimizes duplicated requests and round trips, with no intervention, and the single 'query' can operate over multiple data sources like mentioned previously.) In other words: it does side effects all the time, and makes them manageable in ways you could only dream of in other languages. Did I mention all of that was done in a library? :)
I mean, we definitely have a sales problem, don't get me wrong. We could spit these stories better or clean up the presentation. I can list off a dozen things Haskell is poor at, or probably an infinite number given the time. But you sort of chose literally the worst example in the world to make your point.
I would suggest you actually spend some time with the language in anger. It is not easy. But I've been writing 'real world' software in Haskell for years, and it's no more difficult or 'magical' than any other part of being a software developer. It's just more rewarding because my code works far more often. And working code seems to be something that's rare in the software world these days ;)
And nice libraries. But other languages have them bigger and of similar quality.
It's not a fundamental flaw it's a change. Basically in the early days of Haskell they decided to make much of the prelude (the builtins) work on the concrete type "list" rather than on more abstract types for beginner simplicity, with more abstract "interfaces" like Foldable not shown upfront, with the attendant duplication as each function of the prelude now has a more abstract duplicate somewhere else.
The FTP change reverses this and alters the prelude to operate on abstract types rather than concrete ones, this somewhat increases the initial learning experience[0] but it doesn't really change the language itself.
For C# equivalence, imagine if all the most easily accessible functions operated on the concrete `List` to avoid having to introduce interfaces and all had duplicates taking an IEnumerable instead (that doesn't quite work as C# uses methods but there you are).
And surely if that's a "fundamental flaw" of Haskell, you've wasted your time with C# and its fundamental flaw of non-generic System.Collections
[0] for complete beginners with no concept of abstract types I guess? For Haskell beginners coming from other languages it doesn't seem like a big issue, just a matter of how abstract types which is already an issue between languages anyway e.g. where Haskell has Foldable C# has IEnumerable, Ruby has Enumerable, Java and Python have Iterable, ...
Thanks! Considering 'List' is one of the few structures of FP I understand, that makes actual sense.
I would guess that Ocaml might be better in unixy environment while sharing similar features to F#?
Besides, you would also be asserting that F# does not have that flaw. I don't believe you have that evidence either.
That said, F# is pretty nice. It's opt-in laziness for .NET compatibility but laziness is pervasive. There's no forced purity though. On the plus side it's easy to interact with anything that has .NET bindings.
sum :: (Num a) => [a] -> a
Which means: for any a which is a number, sum can be used to add up a list of as.
However, going back to the C# example, you'll note we said IEnumerable<T>, not List<T>. In C#, the container is general, but in Haskell it's specific. And since IEnumerable is an interface, this actually means "any type that is enumerable". Haskell has an analogue of IEnumerable called Foldable.
So, what we _really_ wanted sum to say was "sum is a function that, for any container f that is foldable, for any type a that is a number, takes an f of a and gives you an a".
sum :: (Foldable f, Num a) => f a -> a
This is the AMP style version of sum. Some people hate it, I love it.
However, there's another piece of background to this that the email doesn't mention: the Haskell Platform is under attack itself. There's a new solution called stack which is, to my mind, easier to use and less likely to bite you with version conflicts. And whether HP should continue to be the "default" recommended way of starting with Haskell is, at best, controversial.
In short: there's plenty of people who won't miss his work on Haskell Platform, but losing Mark himself is a loss.
A thing about Foldable is that you can fold over it (obviously) but you can't necessarily map over it because in Haskell the general map (fmap of the Functor typeclass) has the law that `map (f1.f2) enum == ((map f1) . (map f2)) enum` but for example for Set this law won't hold because the intermediate set might drop elements identical elements that would not have been identical would the f1.f2 been applied in direct succession. See [0] for an example. Why fmap has this law I don't know, but Functor is super fundamental in Haskell's types so you can bet it's there for a good reason.
Note that this Foldable-Traversable-Functor introduction into Prelude is not complete yet. For example the map in prelude is: `map :: (a -> b) -> [a] -> [b]`. If this movement continues it will possibly be `map :: (Functor f) => (a -> b) -> f a -> f b`. People are super scared of the name Functor, so I think that's why it's not been adopted yet. It should possibly be renamed to Container or Mappable to be more in line with what general developers expect.
Would prelude's map be made equal to fmap however, it would make prelude super powerful. It would suddenly work on any Functor type, not just List.
[0] https://www.fpcomplete.com/user/chad/snippets/random-code-sn...
p.s.: if you don't grok typeclass, call it classclass instead, i.e. class of classes. And then think about how C#'s Interface also defines a class of classes.
[0] https://wiki.haskell.org/Foldable_Traversable_In_Prelude
This just appears to be a decision of an individual to stick to what they think is the best platform/version for them. Since the individual was also the Release manager, seems like stepping aside was the logical thing to do if they do not prefer the latest version of the language.
https://www.reddit.com/r/haskell/search?q=foldable+traversab...
[0] https://wiki.haskell.org/Foldable_Traversable_In_Prelude
If you, like me, have no idea what this is about, just go back to coding in one of those subtheoretical languages for feeble minded norms, like me.
I'm sure these guys are doing some REALLY IMPORTANT WORK with a language as obscure as that. Way over my head, I'm sure.
EDIT: Scrollaway, thanks for asking. I don't really have a beef with Haskell itself, I just think its tragic that so many smart people are drawn to something that has .. well.. let's just say, I'd love to hear the practical aspects of Haskell.
All languages and paradigms can be obscure to outsiders. Just take a look at http://programmers.stackexchange.com/questions/tagged/object...
Even if you wanted more function, you couldn't have it, because there isn't. And yet, you find that it has no function. None!
Water, water, every where,
And all the boards did shrink;
Water, water, every where,
Nor any drop to drink.Scala has awful types. GHC 7.10.2 change is still elegant.
I started learning haskell 3 years ago with no background in CS nor in mathematical expertise. So I feel like I'm still a noob toying with ghc until late.
But I welcome that change with a big smile! In my opinion it resolves the list problem (who can be a jail sometimes). As a newcomer I always started with lists which often ended as a bad choice but I learned it that way...
Like: "Oh, wait.. those lists were cools but... WHAT? I need to change everything because just now there are too limited? Fffuuuhh..."
I'm pretty curious, can someone summarize for me, what was the deal with FTP? What are the pros and cons, and why are people upset about it? That'd be really nice, thanks.