4 ms·
This reminds me of one of the closing remarks of Simon Peyton-Jones in his A History of Haskell talk[0]. "Haskell is great fun, it's rich enough to be useful b
by siraben 6y ago
This reminds me of one of the closing remarks of Simon Peyton-Jones in his A History of Haskell talk[0].
"Haskell is great fun, it's rich enough to be useful but the thing that I think is really important about it is that it's a kind of playful language. It encourages people who want to play and so I've given some examples here about the sort of playing that people do embedded domain-specific language and cunning type programs, but it's a language in which is fun to write programming pearls in which people really do start to do bits of programming as an art form, write papers about them and even get them published and I think this is good not just because it's fun but also because play leads in the end to to new discoveries so I think languages that are playful lead onto to learning new things."
This playfulness is evident whenever you spend enough time in #haskell in IRC, a question about writing a program to reverse a list ends up in a discussion about folds, talking about ADTs leads you to discover a whole new meaning to "(datatype-)generic programming" and so on, there's even a bot that makes your code 100% pointfree (online version at [1])!
In practice, it's not needed to use these super generalized/golfed solutions, but having the knowledge that there's many ways to approach the problem is akin to knowing many licks and scales in Jazz improvisation, makes programming a great deal more fun and flexible.
[0] https://youtu.be/3bjXGrycMhQ?t=2624 https://youtu.be/3bjXGrycMhQ?t=2624
[1] http://pointfree.io/ http://pointfree.io/
- platz 6y agoI actively avoid super general code in my Haskell applications. Here's some code to add a bookmark in an api controller: https://github.com/jonschoning/espial/blob/master/src/Handler/Add.hs#L59 https://github.com/jonschoning/espial/blob/master/src/Handle...