Modules and their explicit export lists (are an annoyance)
lennart at augustsson.net
Sat Jun 19 16:57:06 EDT 2010
Encapsulation is essential for constructing robust software.
How could we get rid of that and claim to have a serious language?
On Sat, Jun 19, 2010 at 8:38 PM, Christian Höner zu Siederdissen
<choener at tbi.univie.ac.at> wrote:
> Hi everybody,
> I'd like some input on other peoples' thoughts on this. Recently, I
> played around with a library that uses an explicit export list. While
> there are reasons for having one:
> - efficiencey (inlining in the module)
> - encapsulation
> in practice, it seems to me that they are more annoying than useful. For
> once, it would think that ghc should produce efficient good across
> modules with -O / -O2 anyway.
> But the more important thing is, that it makes extending module
> functionality a pain (eg. if a constructor is not exported using (..)).
> So, should I really fork a library just to be able to add a function?
> Btw. there are libraries, where an explicit export list is used, that
> export the right amount of information. For example, in 'vector' enough
> is exported to allow you to extend unboxed vectors.
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
More information about the Glasgow-haskell-users