X-Comment1: #############################################################
X-Comment2: #     uk.ac.glasgow.cs has changed to uk.ac.glasgow.dcs     #
X-Comment3: #     If this address does not work please ask your mail    #
X-Comment4: #     administrator to update your NRS & mailer tables.     #
X-Comment5: #############################################################


----- Begin Included Message -----

>From haskell-request Wed Oct 16 18:01:26 1991
Original-Via: uk.ac.ed.aiai; Wed, 16 Oct 91 17:56:53 BST
Date: Wed, 16 Oct 91 17:58:20 BST
Message-Id: <[EMAIL PROTECTED]>
From: Jeff Dalton <[EMAIL PROTECTED]>
Subject: Re:  dependency analysis
To: Kevin Hammond <kh>
In-Reply-To: Kevin Hammond's message of Wed, 16 Oct 91 14:05:14 BST
Cc: haskell
Sender: haskell-request
Status: R

> > > | Our Haskell in Haskell compiler modules are often unavoidably mutually
> > > | recursive.  For small programs you may be right, but for large programs
> > > | mutually recursive modules are almost inevitable:
> > > |
> > > |         i)      There's always some implementation limit 
> > > |                 on module size, even with a C compiler...
> > > |
> > > |         ii)     Readability or the need for separate working 
> > > |                 may demand that a large module be broken into parts.
> > > 
> > > I'm not sure I buy this.
> > 
> > Nor I.  It looks like a confusion of module with compilation unit.
> 
> Certainly not.  I said separate working, not separate compilation.
> What I meant to say was "separate programming by multiple
> programmers".  I plead a headache caused by simultaneously studying
> category theory and microcode :-)

I don't want to be pedantic, but there was also:

   There's always some implementation limit 
   on module size, even with a C compiler..

and an earlier message also mentioned compiler limitations.

As for readability and the demand for separate working, I should say
that there may well be some cases where the natural modularity of a
program leads to mutually recursive modules.  (Your checker example
may qualify.)  If those cases are sufficiently important, that would
justify allowing such modules in the language.

However, I do not think readability and the demand for separate
working should be used to justify module divisions that would 
otherwise be artificial.


----- End Included Message -----


While we're at it, let's keep users from writing mutually recursive
functions, such as 'eval' and 'apply' :-). 

Mutual recursion is a natural part of functional programming style, and
we shouldn't have to come up with special examples to justify its existence.
The reason that the typechecker is written with mutually recursive modules
is that it is more natural to manage it this way, and that stems directly
from the fact that mutual recursion is used to write it. We broke it
into modules early on, before it grew so large that it couldn't possibly
fit into one module.

Cordy Hall

Reply via email to