Chris Okasaki wrote:

> I've taken a look at these.  I'll limit myself to just one comment:
>
> >1.1.1. Constructor names
> >
> >    Empty values of type X have the name emptyX, e.g. emptySet.
>
> You've struck a pet peeve of mine.  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 agree 100% with Chris.  Having the type as a suffix just gives you poor
maintainability of the code.  If I want to switch from FooTree to BarTree
I have to change all over the code, whereas with an `import .. as X' and
X.empty I only have to change in one place.

--

        -- Lennart




Reply via email to