News for hackers. Stuff that matters.
Re:What I Want from a Type System (2016) by Symmetry on Monday July 01, 2019 @10:19AM (#20325458)
And the weird thing is that it's almost trivial to create an equivalent of (.) in Haskell that's ordered in the more natural forward way and I really wish it was a standard. Though (.) itself does get rid of all those parenthesis.
Re:What I Want from a Type System (2016) by jose_zap on Monday July 01, 2019 @01:28PM (#20327642)
That would probably be the (&) operator, which is In the standard library
Re:What I Want from a Type System (2016) by Symmetry on Monday July 01, 2019 @02:02PM (#20328006)
I was thinking more about composition than application. Thankfully, I just remembered that you can use Hoogle to search by type signature so I popped in (a -> b) -> (b -> c) -> a -> c and it directed me to (.>) which is exactly what I was thinking of in the flow package.

Flow seems like an interesting package to check out if I ever go and start using Haskell seriously.

Re:What I Want from a Type System (2016) by cannabis_sam on Monday July 01, 2019 @04:01PM (#20329174)
There is also >>> for left-to-right composition, which is in base.

My favorite is Elm, which has |> and <| for application, and >> and << for composition, in the intuitive directions. It makes it easy and natural to eta-reduce/expand, when you want to.

Re:What I Want from a Type System (2016) by echaozh on Monday July 01, 2019 @11:07AM (#20326018)
And reversing the order is also easy. F# has operators going both ways.