From owner-sc22wg5@dkuug.dk  Wed Jun 25 22:56:35 2003
Received: (from majordom@localhost)
	by dkuug.dk (8.12.8p1/8.9.2) id h5PKuZ2u061840
	for sc22wg5-domo; Wed, 25 Jun 2003 22:56:35 +0200 (CEST)
	(envelope-from owner-sc22wg5@dkuug.dk)
X-Authentication-Warning: ptah.dkuug.dk: majordom set sender to owner-sc22wg5@dkuug.dk using -f
Received: from math.jpl.nasa.gov (math.jpl.nasa.gov [137.79.7.57])
	by dkuug.dk (8.12.8p1/8.9.2) with ESMTP id h5PKuTEc061835
	for <sc22wg5@dkuug.dk>; Wed, 25 Jun 2003 22:56:31 +0200 (CEST)
	(envelope-from vsnyder@math.jpl.nasa.gov)
Received: from math.jpl.nasa.gov (localhost.localdomain [127.0.0.1])
	by math.jpl.nasa.gov (8.12.8/8.12.8) with ESMTP id h5PKuBJe002382;
	Wed, 25 Jun 2003 13:56:11 -0700
Received: from math.jpl.nasa.gov (vsnyder@localhost)
	by math.jpl.nasa.gov (8.12.8/8.12.8/Submit) with ESMTP id h5PKuB0r002378;
	Wed, 25 Jun 2003 13:56:11 -0700
Message-Id: <200306252056.h5PKuB0r002378@math.jpl.nasa.gov>
X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4
X-Exmh-Isig-CompType: repl
X-Exmh-Isig-Folder: inbox
To: sc22wg5@dkuug.dk
Cc: longb@cray.com
Reply-to: Van.Snyder@jpl.nasa.gov
Subject: Re: (SC22WG5.2824) Submodule association and host association 
In-Reply-To: Your message of "Wed, 25 Jun 2003 15:02:03 CDT."
             <200306251958.h5PJwZRQ061483@dkuug.dk> 
From: Van.Snyder@jpl.nasa.gov
Mime-Version: 1.0
Content-Type: text/plain
Date: Wed, 25 Jun 2003 13:56:11 -0700
Sender: owner-sc22wg5@dkuug.dk
Precedence: bulk


Bill Long wrote:

> ... in a previous post the philosophy seemed to be "even if there is no 
> need for a feature we should not disallow it".   I think the problem 
> with that philosophy is the difficulty in drawing the line between 
> "artificial restriction" and "feature bloat".

> The other problem I see 
> is that the length of the feature list is roughly proportional to  the 
> time you have to wait before an actual compiler implementation appears.

I've only written little compilers for little languages -- never anything
even remotely as ambitions as a Fortran compiler.  So correct me if I'm
wrong.  It should be easier to allow a natural generalization of a
feature by ignoring a gratuitous constraint than it is to enforce it. 
For example, many Fortran 77 processors found it easier simply to allow
list-directed I/O for internal files than to go to the trouble to prevent
it.

The relation of a submodule to a parent submodule would be exactly the
same as its relation to a parent module.  So prohibiting a submodule's
parent to be a submodule is an artificial restriction.

The relation of a separate interface to its corresponding separate
procedure body is the same no matter whether they're in the same program
unit or the body is in a proper descendant of the one containing the
interface.  So prohibiting them to be in the same program unit is an
artificial restriction.

If there are sound reasons why implementation would be substantially
easier with these restrictions, we need to hear them.  Sure, the design
of a processor is affected by the choice, but is it easier, or just
different?

For example, one may reason "Submodules are different from modules in
that I cannot access a submodule by USE association.  So I won't put
submodule information into a .mod file; rather, I'll use a file with a
different extension, and entirely different organization.  If a
submodule's parent can be a submodule, I'll need to use a .mod file in
both cases, and put in a flag that says 'this is a submodule; USE
association is not allowed."  If I were a developer, I might do the
latter anyway, just to save the effort of developing an entirely new
separate-compilation infrastructure.  Then a prohibition that a submodule
cannot be the parent of a submodule would require extra work: I'd have to
check that flag and generate a diagnostic both for the USE case and the
parent case.  I also suspect that having a .mod file for submodule
information would lead to better diagnostics.  The processor could say
"The submodule FOOBAR cannot be accessed by USE association" instead of
"Huh???"

If the absence of a restriction doesn't cause a headache for developers,
I always come down on the side that allows the greater variety of
styles.  I have never understood the urge to impose restrictions just so
all programmers will be restricted to the subset of possible styles that
one group finds to be sufficient.

-- 
Van Snyder                    |  What fraction of Americans believe 
Van.Snyder@jpl.nasa.gov       |  Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or disapproved
by JPL, CalTech, NASA, Sean O'Keefe, George Bush, the Pope, or anybody else.


