Hello,
When writing a Haskell module, we can write
> module Foo ( x, y, z ) where
to express that x, y and z are the names we want to export.
This is nice as long as the export list is short. However, often we
define a lot of stuff in a module and want *most* of them exported, and
we are cursed to write a long long export list. What's more, whenever
an exported name is to be deleted from the module or the module is
extended with new functionalities, we have to remember to change the
export list accordingly.
Why not let Haskell support negative export list? Like:
> module Foo hiding ( a, b, c ) where
My experience is that such negative export lists are usually much
shorter than the corresponding positive lists, and therefore much easier
to use.
I guess the rational behind the current design is that everything by
default should be private. However, I doubt whether it is valid: In
Haskell the let/where clause allows us to keep auxilliary functions from
polluting the top-level name space. As a result, I seldom write
"private" functions at top-level, and I think the situation might be
true for other functional programmers as well.
-- Zhanyong Wan
Yale University