public/private module sections

Ketil Malde ketil+haskell at ii.uib.no
Fri Feb 24 14:40:14 EST 2006


kahl at cas.mcmaster.ca writes:

> In my personal experience, I have three kinds of Haskell modules:
>
>  1.  Exporting everything
>  2.  Exporting almost everything
>  3.  Having a designed export interface

I tend to start out exporting everything, which I find useful for
testing the internals, and sometimes it is useful to postpone
interface decisions during development.  Later on, I try (or at least
feel guilty if I don't) formalize and restrict the exports to a
suitable subset of the module.

The nice thing about the current situation is that I can change this
by modifying a single line (or at worst, a handful of them, nicely
localized).  So if you ask me, I'm against sprinkling public/private
labels all over the module.

On a related note, I don't much care for the export hiding proposal;
not that I think it will get in the way much, but it just feels like
the wrong thing to do, and a habit which shouldn't be encouraged.

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants



More information about the Haskell-prime mailing list