On 06-Nov-1998, Erik Meijer <[EMAIL PROTECTED]> wrote:
> Hi Alex,
>
> >[...]
> >[ describes that he wants interleave the definitions of several functions ]
> >[ but Haskell does not allow this ]
> >[...]
> >This restriction is very frustrating because I want to add names to a
> >function lookup table as they are derived. Is there a strong reason for
> >disallowing this syntax?
>
> Well, it depends on what you call *strong*. The only reason that I heard is
> that it prevents users from making possibly unwanted errors.
Another reason is that allowing definitions to be split up
without any special syntax indicating this would harm readability.
If I see a definition, I can't be sure it's complete without
examining the whole module.
Since the order of clauses affects the semantics, I don't think
it would be a good idea to allow them to be widely separated.
If the proposal was to allow them to be separated, but only
with some special declaration, e.g. a keyword "noncontiguous",
prefixed to each clauses, that wouldn't be so bad for readability.
But if we have to add new syntax to make it work then it
is getting to be more trouble than its worth.
--
Fergus Henderson <[EMAIL PROTECTED]> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.