3 ms·
PureScript, which borrows heavily from Haskell's syntax (you could say it is Haskell for JavaScript but with strict evaluation) already had something like this
by TazeTSchnitzel 6y ago
PureScript, which borrows heavily from Haskell's syntax (you could say it is Haskell for JavaScript but with strict evaluation) already had something like this for syntax for accessing records (JS objects). It wisely didn't also use the dot for function composition however. I hope it will be the norm to use some alias other than (.) for function composition when this extension is used.
- sullyj3 6y agoI'm a big fan of the flow package (https://hackage.haskell.org/package/flow https://hackage.haskell.org/package/flow), which defines (<.) :: (b -> c) -> (a -> b) -> a -> c and (.>) :: (a -> b) -> (b -> c) -> a -> c
- srtjstjsj 6y agoHaskell is full of things (hello, most of Prelude) where the default thing is terrible and the correct thing is in a package (usually a choice between multiple incompatible packages). It makes it extremely uncomfortable to grow from newbie to intermediate.