7 ms·
Resigning from the Haskell Platform
- ptype 11y agoWould anyone be able to give more background on the controversy?
- jewbacca 11y agoWithholding a tl;dr until I've read enough to understand it myself, here is where I'll be looking to generate a quick impression: https://www.reddit.com/r/haskell/search?q=foldable+traversable&restrict_sr=on https://www.reddit.com/r/haskell/search?q=foldable+traversab... https://wiki.haskell.org/Foldable_Traversable_In_Prelude https://wiki.haskell.org/Foldable_Traversable_In_Prelude
- jkarni 11y agoA more complete description is available here [0], but the essence of it is that the type of many functions that used to be specifically about lists has become more general, but also arguably harder to understand. [0] https://wiki.haskell.org/Foldable_Traversable_In_Prelude https://wiki.haskell.org/Foldable_Traversable_In_Prelude
- psibi 11y agoFTP (The Foldable/Traversable proposal in prelude) is a change done to the core library of GHC 7.10. It brings the Foldable and Traversable typeclass to Prelude and makes the existing function of Prelude more polymorphic. Like the type signature of the function "and" changes from [Bool] -> Bool to Foldable t => t Bool -> Bool. People in the Haskell community have divided opinions about this. You can see more details here[0]. [0] https://wiki.haskell.org/Foldable_Traversable_In_Prelude https://wiki.haskell.org/Foldable_Traversable_In_Prelude
- dagw 11y agoI understand what is changing, but not the controversy. As a very casual Haskell user it all seems reasonable enough. What are the strong arguments against? What happened in 7.9-7.10 that made Haskell 'worse' in this persons opinion.
- thoughtpolice 11y agoTwo very clear problems are that it introduces more complexity up front for beginners (because now to understand `length` you need to understand the concept of type classes) and the change had the possibility to break some extant code, due to it changing some type inference properties. In practice, I think #2 was a fairly uncommon case, and the fixes were trivial and backwards compatible, so the cost was deemed pretty acceptable. #1 is a point of debate, because 'beginner' needs context (perhaps experienced programmers that are Haskell beginners would get over it quickly, but non-programmers would be substantially more confused, etc). Unfortunately I don't think we have a lot of truly empirical evidence on #1.
- HelloNurse 11y agoMy empirical evidence is against #1: up-front productive learning beats permanent uncertainty. - I can fold a list, but what about other types? Which of the similarly or identically named functions dispersed among a bewildering number of library modules is the right one? Are they any different? - I can fold a Foldable? What is it? Let's find a tutorial about Foldable. Ooh, nice! That takes care of folding anything that can be folded! If I'm not folding a list I only need to find where the relevant Foldable instance is (very easy) or to write one myself (reasonably easy).
- dmit 11y agoOne issue is making the learning curve even steeper. Compare the <=7.8 signature of a simple function (which itself is not obvious to beginners) to the 7.10 one: find :: (a -> Bool) -> [a] -> Maybe a find :: Foldable t => (a -> Bool) -> t a -> Maybe a The obvious beginner question looking at this code is "what's `t a`?", and now you have to explain type classes to someone who just wanted to find an element in a list. There's a list of arguments against FTP compiled on the Haskell wiki: https://ghc.haskell.org/trac/ghc/wiki/Prelude710/List https://ghc.haskell.org/trac/ghc/wiki/Prelude710/List
- spion 11y agoYes that seems like it would be much steeper for complete beginners. It might actually make things easier for people coming from other languages - you get to learn typeclasses by comparing foldable with similar familiar concepts from other languages (iterable / enumerable) without getting special syntax as part of the "understanding" package (do notation / overloaded literals).
- devnonymous 11y agoFrom a cursory glance (I'm not part of the large haskell community), there doesn't appear to be any controversy. 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.
- moomin 11y agoLet's describe this in a way that makes sense to me, a C# programmer. In C#, there's a function called Sum. It takes an IEnumerable<int>. There's an overload for IEnumerable<double>. There's no way to express "is a number" in C#, so it's just special cased. In Haskell, however, there is: 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.
- tinco 11y agoAnother hint of intuition for C#'ers out there. Foldable is like IEnumerable, and Traversable is a bit like ICollection. Some are a bit unhappy with the names too, even though they really make sense from the category theory sense. 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-snippets/set-is-not-a-functor 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.
- FrankenPC 11y agoHmmm... Is F# a good alternative? I already have a ton of experience with .NET and C#. I'm thinking about doing a deep dive into functional programming and don't want to waste my time with something that has a major fundamental flaw.
- spuz 11y agoThat's quite a rash conclusion to jump to. Every language has its controversies and quirks. I would recommend deep diving both into F# and Haskell - you certainly won't be wasting your time either way.
- glogla 11y agoHow is F# on unix? I can imagine F# being nice on Windows, but can people with Linux or Mac OS use it? How dependent on visual studio it is? I would guess that Ocaml might be better in unixy environment while sharing similar features to F#?
- sitharus 11y agoIt's not dependent on Visual Studio at all. It has its own build chain (FAKE), runs under Mono and ships independently from .NET. It's the most open-source of the MS projects.
- spuz 11y agoWell F# from the very beginning has always had a bit of a rebellious nature seeing as it was brining ML style programming to the traditional OO platform of Microsoft's .NET. Because of that, many F# people do not use Windows and F# is very much built to be as independent from Microsoft as possible. See here for various ways to use it on linux: http://fsharp.org/use/linux/ http://fsharp.org/use/linux/
- dagw 11y agohttp://fsharp.org/guides/mac-linux-cross-platform/ http://fsharp.org/guides/mac-linux-cross-platform/ Core language works fine and no dependence on VS. There are packages for most distros. Libraries outside the core language are a bit hit and miss, but you'll find libraries for most things you want to do. If you have a Windows project where you've been NuGetting stuff from all over the place, porting might be a bit of a pain.
- paulsutter 11y agoHey, Haskell wouldn't be cool if /everybody/ used it. Some guys are totally down with bringing "the Foldable and Traversable typeclass to Prelude" and making "the existing function of Prelude more polymorphic", while others feel that just synergizes the wrong paradigm. 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.
- csvan 11y agoJudging from how shallow your reasoning appears to be, it is way over your head indeed.
- scrollaway 11y agoGot some inferiority complex showing here? What exactly is your problem with Haskell?
- ehvatum 11y agoThere is beauty in decrying the inapplicability of a purely functional thing: 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.
- retrogradeorbit 11y agoI can't read Spanish. That's because I don't know Spanish. But does that mean that Spanish is a bad language? Or does it mean that Spanish speakers are somehow superior for writing this language I can't read? No. The Spaniards seem to be doing fine with it.
- tempodox 11y agoAs I see it, the practical aspect of Haskell is to build things that are completely specified and need only be implemented. I can't imagine using it for anything remotely experimental, but if your job is implementing a completed spec, Haskell might well be worth the learning curve.
- paulsutter 11y agoCan I ask a question about Haskell? I see a lot of excitement about it, but, honestly it seems a bit over my head and I'd love to understand. 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)
- moomin 11y agoHaskell is, frankly, hard to learn. But the interesting thing about learning Haskell is that you feel like you're actually learning more about coding and computation, whereas most languages just feel like you're learning a new syntax for doing the same thing. 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.
- paulsutter 11y agoI like that description, it conveys a sense for what can be appealing about 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?
- adwn 11y ago> But, will humans even be coding in 30 years? I don't see the connection between Deep Learning and removing humans from the software engineering process, so yes, humans will still be coding in 30 years. (and some of it will still be done in C, and maybe even in COBOL)
- Confusion 11y agoErik Meijer has been railing against this change on twitter, saying he won't use this version of Haskell for future sessions of the FP101X EdX MOOC. It seems to me that a change that is so divisive among experts is not likely to be a good idea. Disagreement is one thing, but this seems more than just disagreement...
- skimpycompiler 11y agoThe irony is that this change has nothing to do with expertise. It is entirely subjective. Scala has awful types. GHC 7.10.2 change is still elegant.
- grp 11y agoI think it's sad to resigning like that but the newcomer argument is misused in this controversy. 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..."
- codeisawesome 11y agoCool, genesis of a fork.
- rkrzr 11y agoIs there going to be a backwards-compatible version of Prelude then? Maybe called something like SimplePrelude which could be imported to keep all old code working without any changes (it could also be used for teaching purposes then, because the old Prelude really is much easier to understand for beginners, I think). Or does this change break something fundamentally that makes this impossible?
- kolme 11y agoI don't know anything about Haskell other than the basics. I've played around with it, but the most "complicated" things I made with it was Fibonacci and factorial functions. 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.
- _Codemonkeyism 11y agoThe arguments look a little bit like the CanBuildFrom in Scala, which makes container methods really nice (return same container type that you gave it) but method signatures harder to read, with the argument that it makes Java developers go away.