Fri, 23 Jun 2000 09:05:54 -0400 (EDT), Chris Okasaki <[EMAIL PROTECTED]> pisze:
> These suffixes are doing namespace management, avoiding name clashes
> between different things that you want to call empty. But Haskell
> already has a perfectly good language mechanism for doing this --
> the module system! Why is emptyX preferable to X.empty? The latter
> convention is much more flexible.
I prefer recognizing common interfaces and making appropriate classes.
It is more convenient and more flexible than qualified imports:
* More than one type can be used unqualified at the same time.
* The same function will work for different types.
* Adding a new implementation will get some derived functions and
default methods for free.
* Different types need not be exported by separate modules.
* Interfaces of derived modules will be overloaded instead of
being tied to particular implementation. Imagine what happens
when one module produces a set implemented as SetX and another
expects a set implemented as SetY. We don't have parametrized
modules.
I don't like modules that have to be imported qualified.
--
__("< Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
\__/ GCS/M d- s+:-- a23 C+++$ UL++>++++$ P+++ L++>++++$ E-
^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-