Live data from Hacker News

Reflecting on Haskell in 2015

stephendiehl.com

81–90 of 106 posts

Re: Reflecting on Haskell in 2015

#81

I consider myself a functional programmer, and I also have an interest in logic and type theory, and have learned enough Haskell to write some student-level projects in it. But when I try to dip my toe back into the Haskell community, a wave of despair washes over me. There's just too much. Haskell is changing too fast. There are too many language extensions, and more and more conceptually sophisticated features keep…

For me all the extensions and abstractions induce a kind of choice paralysis, and fear that my program isn't abstracted far enough. I don't feel that when working in C, Java or Ruby.

> ...fear that my program isn't abstracted far enough...

This. I feel exactly the same. I read various concepts like Free Monads, I go find papers and read them. But when I sit down to write code, my code is a blob doing IO. I can use State monads, StateT etc. But the result is not the elegant programs that I see on books and blog posts.

I am also very pragmatic. I want to build tools that implement an idea I have. I want to build as soon as possible to try these ideas out. But when programming in Haskell, I find myself code golfing and lost in the means rather than the ends.

Re: Reflecting on Haskell in 2015

#82
post #69

Earlier quoted context omitted.

"Monad" is an abstraction. What kind of abstraction? An algebraic abstraction. That means really understanding the concept is much like understanding other algebraic abstractions. The most basic concept in classic 19th century abstract algebra is "group." Just like the monad concept, this concept involves a set of values that can be combined with a few carefully chosen operations. Just like with the monad concept, th…

What an excellent linking of groups to monads, I really enjoyed reading this! Thanks for writing it up.

Nice to hear! I've been thinking vaguely about it for a while as a way to explain monads in a wider perspective. Now that someone other than myself seems to find it clarifying, I'll try to work it into a short text to put up.

Re: Reflecting on Haskell in 2015

#83
post #19

Earlier quoted context omitted.

For learning functional programming I find Racket to be the best for teaching functional programming. I think I took 4 tries at teaching myself Haskell and then learning Racket really helped me to get over the learning curve of Haskell though i still consider myself a beginner.

I've tried Haskell 4 times. No joke. I have no problem with currying, higher-order functions, foldl, etc., but Monads. Get. Me. Every. Time. My brain just refuses to fully "grok" them. I still don't see why they're so awesome. I know I use them day-to-day - LINQ, the "List" abstraction (supposedly also a monad??) but I just don't see why it's important to understand them on this whole new fundamentally different leve…

Like Erik Meijer said in his course : there is nothing special or magic about monads. They don't deserve all the fuzz arround them. If you don't get why monads are so awesome, maybe that's a proof that you understood them. Because there is nothing special !!

A monad is just a type with 2 functions defined. Like an interface with two methods in OO langages. The 2 functions have to respect some laws but you can imagine whatever implementation for the 2 functions as long as the laws are observed (et type signature of course).

You could invent a total different implementation for the list monad, for the maybe monad, etc (if you respect the laws). There is no hidden ultra powerfull meaning which implies only one implementation.

The best paper on monads i ever read is an ascii art one, by Graham Hutton : http://www.cs.nott.ac.uk/~pszgmh/monads

Re: Reflecting on Haskell in 2015

#84
post #46

Earlier quoted context omitted.

> My brain just refuses to fully "grok" them. I still don't see why they're so awesome. I know I use them day-to-day - LINQ, the "List" abstraction (supposedly also a monad??) but I just don't see why it's important to understand them on this whole new fundamentally different level. Why do you want to "grok" them? Just use them. In fact I'd say there isn't much more to grokking them than just using them.

" Why do you want to 'grok' them? Just use them. " You remind me of my first ground school instructor. I'd asked her why it was necessary to use rudder in a turn, and she waved her hand dismissively. "Just step on the ball" she recited, referring to the turn-and-bank indicator. No thank you, I'd rather know what's keeping my plane stable, so I found the answer elsewhere: Langewiesche's awesome Stick and Rudder , stil…

I'm very much in favour of people digging down into the fundamentals of what they're learning, if they want to. I think PopsiclePete, on the other hand, would be perfectly happy with your ground school instructor, and there's nothing wrong with that.

Re: Reflecting on Haskell in 2015

#85
Speaking as somebody that dabbled around with a lot of programming languages, I believe that haskell is kind of an endpoint. Doesn't get better than this. Going back (to other languages) is harder than going further (improving on haskell).

But pure haskell might be too much for a begginer. For me, as an hobbyist, it was. Then I discovered a real world haskell, Elm that (for now) is 'married' to JS. Later, if I feel the need, I can always 'upgrade'. IMHO elm is for haskell, what meteor is for javascript. Even without support from purists, they conquered their market share. This irritated a lot of people.

Re: Reflecting on Haskell in 2015

#86
post #5
post #2

I like Haskell but I see no future in terms of widespread adoption for it. It's simply too alien for your typical CS grad and for some projects one would like to use it for (let's say security critical), laziness (and non-predictable behavior in terms of memory use and performance) is a big problem. We do however see some of its features being slowly introduced to other languages which is nice, I guess.

> It's simply too alien for your typical CS grad In my university, Programming 101 (mandatory) was (and is) Haskell. For context, there is typically a mix of experience among the class - some will have programmed seriously before, but others will have only studied math. I had already studied Java, but I found Haskell a delightful re-introduction (it was my first exposure to functional programming) and I see its value…

As a first language, I think Haskell is too safe. It forbids you from doing too many things that the computer can do. I recently talked to someone who was learning Haskell as a first language, and it was a surreal experience. It was obvious that he wasn't having fun in the sandbox, but he couldn't articulate it because he'd never been outside the sandbox.

My own first language was QBasic and I'm very happy about it. If I'd been made to suffer through parsers instead of putting colorful circles on the screen, I would think of programming as hard work, and that probably wouldn't lead to a very good career.

Re: Reflecting on Haskell in 2015

#87
post #82

Earlier quoted context omitted.

What an excellent linking of groups to monads, I really enjoyed reading this! Thanks for writing it up.

Nice to hear! I've been thinking vaguely about it for a while as a way to explain monads in a wider perspective. Now that someone other than myself seems to find it clarifying, I'll try to work it into a short text to put up.

[deleted]

Re: Reflecting on Haskell in 2015

#88
post #83

Earlier quoted context omitted.

I've tried Haskell 4 times. No joke. I have no problem with currying, higher-order functions, foldl, etc., but Monads. Get. Me. Every. Time. My brain just refuses to fully "grok" them. I still don't see why they're so awesome. I know I use them day-to-day - LINQ, the "List" abstraction (supposedly also a monad??) but I just don't see why it's important to understand them on this whole new fundamentally different leve…

Like Erik Meijer said in his course : there is nothing special or magic about monads. They don't deserve all the fuzz arround them. If you don't get why monads are so awesome, maybe that's a proof that you understood them. Because there is nothing special !! A monad is just a type with 2 functions defined. Like an interface with two methods in OO langages. The 2 functions have to respect some laws but you can imagine…

> You could invent a total different implementation for the list monad, for the maybe monad, etc (if you respect the laws).

Could you show such a different implementation for either list or maybe?

Re: Reflecting on Haskell in 2015

#89
post #82

Earlier quoted context omitted.

What an excellent linking of groups to monads, I really enjoyed reading this! Thanks for writing it up.

Nice to hear! I've been thinking vaguely about it for a while as a way to explain monads in a wider perspective. Now that someone other than myself seems to find it clarifying, I'll try to work it into a short text to put up.

Please do, I would totally read something like that.

Re: Reflecting on Haskell in 2015

#90
post #5

Earlier quoted context omitted.

> It's simply too alien for your typical CS grad In my university, Programming 101 (mandatory) was (and is) Haskell. For context, there is typically a mix of experience among the class - some will have programmed seriously before, but others will have only studied math. I had already studied Java, but I found Haskell a delightful re-introduction (it was my first exposure to functional programming) and I see its value…

As a first language, I think Haskell is too safe. It forbids you from doing too many things that the computer can do. I recently talked to someone who was learning Haskell as a first language, and it was a surreal experience. It was obvious that he wasn't having fun in the sandbox, but he couldn't articulate it because he'd never been outside the sandbox. My own first language was QBasic and I'm very happy about it.…

> Haskell is too safe. It forbids you from doing too many things that the computer can do.

Computers are to computing science what telescopes are to astronomy, or something. Haskell is a great language for expressing computations, the thing CS is about. It's not meant to flip bits and observe processor states and page faults, if that is your idea of fun. That's more computer engineering stuff.

But Haskell is absolutely capable of drawing pretty circles on the screen in just a couple of lines of code![1]

[1]: https://hackage.haskell.org/package/gloss-1.9.4.1/docs/Graph...

Post reply on HN