3 ms·
This has been proposed, and it is still a good idea if one wants to make Haskell accessible to OO programers. It would require the function composition dot to h
by gregwebs 12y ago
This has been proposed, and it is still a good idea if one wants to make Haskell accessible to OO programers. It would require the function composition dot to have spaces around it, which is already fairly standard practice.
However, just adding some syntax does not finish solving the problem: one still needs to figure out how to get everything to typecheck under all use cases (and all type extensions) and also to operate efficiently at runtime. This article does that (although it isn't actually explained that well in the article).
- mercurial 12y ago> This has been proposed, and it is still a good idea if one wants to make Haskell accessible to OO programers. That's how OCaml records work, too.
- FreeFull 12y agoThe . already has whitespace-sensitive use for namespacing in Haskell, for example `Data.List.concat` is parsed differently from `Data . List . concat`
- njs12345 12y agoHere's the Trac page of the proposal: https://ghc.haskell.org/trac/haskell-prime/wiki/TypeDirectedNameResolution https://ghc.haskell.org/trac/haskell-prime/wiki/TypeDirected... Also a bit disappointed that it didn't make the cut - it seemed like a good pragmatic solution!