Hacker News new | past | comments | ask | show | jobs | submit login

It's actually quite possible to write 'pythonic' haskell, if by pythonic you mean 'kind to human readers'. Many of the obscure < * > style infixes in Haskell have prefix counterparts ( for < * >: liftA2 id). Unfortunately infix is preferred by most haskellers, and the prefix english language forms derive their terminology from advanced branches of mathematics, which make them difficult to understand and use intuitively without sufficient background.

That said, all of these things are symptoms of the preferences of the community around the language, and not restrictions imposed by the language design itself. Core Haskell is actually comprised of some pretty easily understandable functions. You can craft synonyms for more advanced abstractions such as applicative fairly easily once you understand the type system. Haskell more or less gives you everything you need to write functional programs in a way that reads like plain english--this is very uncommon however, given the language's origin and close connection with mathematics.




I remember reading an old post by Gabriel Gonzales on exactly this topic: http://www.haskellforall.com/2015/09/how-to-make-your-haskel...

On the other hand, once I did get used to some of the infix operators, I started to really like some of them, i.e. how:

f data data

becomes

f <$> fancyData <*> fancyData

where what makes the data fancy might be validation, being in container like list, or even some sort of reactive-ui-component, like Flare library for Purescript does: http://try.purescript.org/?backend=flare




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: