4 ms·
I'd like to see an actually pythonic Haskell. Needs the right designer.
by orblivion 8y ago
I'd like to see an actually pythonic Haskell. Needs the right designer.
- entelechy 8y agothis statement makes we wonder: what does pythonic exactly mean?
- orblivion 8y agoThe important part to me is good ergonomics from the point of view of the programmer and reader. Beyond that, some particulars: * Being terse is a lower priority than usual * Cool features are a lower priority than usual * Be careful how you use and then re-use symbols (Haskell can be confusing this way). * Use English (or whatever spoken language) in your symbols
- jakear 8y agoCoconut seems anti all of those. In particular all of the weird infix operators ( ` $.> `, ` :&$ `, etc) [1]. Gives me flashbacks to dealing with Haskell. [1]: I just made those up, but I wouldn’t be surprised if they were real.
- tayo42 8y agoI've started to hate the phrase pythonic at work. its ambiguous and leads to bikesheding.
- pseudalopex 8y agoWhen talking about a language it usually means the design principles summarized in "The Zen of Python"[1]. When talking about Python code it can also mean "idiomatic". [1] https://www.python.org/dev/peps/pep-0020/ https://www.python.org/dev/peps/pep-0020/
- voidhorse 8y agoIt'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.
- a-saleh 8y agoI remember reading an old post by Gabriel Gonzales on exactly this topic: http://www.haskellforall.com/2015/09/how-to-make-your-haskell-code-more.html 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 http://try.purescript.org/?backend=flare