5 ms·
> Joe talked about this in Strange Loop 2014, and it seems to me that the idea is far less crazy than it seems. The more functional programming I do, the more s
by oleks 11y ago
> Joe talked about this in Strange Loop 2014, and it seems to me that the idea is far less crazy than it seems. The more functional programming I do, the more sense it makes.
Someone (sorry, don't remember who) also mentioned this at ICFP in 2012 wrt. Hackage, the Haskell community's package archive - that the better method of delivery is a function, not a library. This makes sense in the Haskell community where you have Hoogle (https://www.haskell.org/hoogle/ https://www.haskell.org/hoogle/) by your side.
- chriswarbo 11y agoModules serve a useful purpose in Haskell too, since they can hide "dangerous" functions, ie. ones which violate invariants (which can't/aren't enforced by types, for whatever reason) when called in particular ways. This is similar to private methods of a class. Personally, I dislike hiding such functions completely, and usually expose them via a ".Inner" module (similar to Python exposing "private" things with _underscores)