On Tuesday 21 February 2006 11:40, Malcolm Wallace wrote: > "Jared Updike" <[EMAIL PROTECTED]> wrote: > > > I am not sure if this has been mentioned before, but something I > > > would really find useful is the ability to tell Haskell to export > > > everything in a function except for some named functions. > > > > No one has responded so ... > > I believe some people (perhaps on another list) have been advocating the > addition of Java-style public/private modifiers on function definitions, > to indicate whether they are exported or not. (A truly horrible idea in > my opinion!) Why is it horrible? It avoids redundancy in the code-file which is a good thing in general. > > > > module Module hiding ( list, of, things, not, to, export ) where > > > .... > > I quite like this for its minimal syntactic overhead, and backward > compatibility. There is a slight worry that it would be too easy to > overlook the "hiding" keyword when reading a module, leading to > confusion.
I dislike this idea because the export list is a sort of signature of the module, which is also often used for structuring the haddock documentation. In case of hiding() version you explicitly state the unimportant parts. Apart from that you might change the hidden functions much more often than the public interface. Proper signatures would be a nice solution I guess. Just my 2p! Regards, Georg > There is also the issue that we might adopt the proposal to allow (and > perhaps eventually, to require) type signatures on export lists. If so, > then it would be kind of ridiculous to have interface signatures only > for the things you are /not/ exporting! > > Regards, > Malcolm > _______________________________________________ > Haskell-prime mailing list > Haskell-prime@haskell.org > http://haskell.org/mailman/listinfo/haskell-prime
pgpaklCJrwz0e.pgp
Description: PGP signature
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://haskell.org/mailman/listinfo/haskell-prime