Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Peter Shenkin <shenkin@still3.chem.columbia.edu>
Subject: Re: fortran error?
Date: 1998/03/20	[thread overview]
Message-ID: <3512F883.167E@still3.chem.columbia.edu> (raw)
In-Reply-To: y6lnu58ggw.fsf@tweedledumb.cygnus.com


Craig Burley wrote:
> 
> Dick Hendrickson <dick.hendrickson@worldnet.att.net> writes:
> 
> > This doesn't mean compilers shouldn't do it, only that there is a
> > real cost.  Inlining helps, but some library code is only available
> > in binary form.
> 
> That's a point in favor of short-term practicality, but I'd
> like to point out that restricting language and tool design to
> allow library code to be distributed only in binary form
> (i.e. proprietary and made hard to reverse engineer), especially
> to *existing* such libraries, *severely* restricts the power of
> those languages and tools.

I've reread Dick's and Craig's comments a few times, and I'm not
sure I understand Craig's harangue in this context.  I think Dick
was using as an example ("Inlining helps....") the fact that, if
you have a library only in binary form, you can't insert INLINE
directives;  therefore, if a library is slow because of failure
of the writer to INLINE, the user cannot recompile it after making
changes unless he has source.

This in no way constitutes a "[restriction] of language and tool
design to allow library code to be distributed only in binary
form."  There's nothing about the INLINE feature that especially
facilitates or restricts binary distribution.  It's just a case
in which someone with access to the source code, motivation for
improving that code and time to spend on the project might be
able to produce faster code.  Changing an underlying algorithm
is another such way such a person could do this.  It has nothing
to do with restricting language features, as far as I can see.

But I also take exception to Craig's overall point of view
on this. I think that if the language definition makes it hard
to distribute libraries as binaries, this also makes it hard
to utilize libraries as re-usable code, even if you do have
the source.  In other words, if I have source for a library, and
if I can compile and readily use the binaries for many programs
on my system, then there is no reason the binary can't be used
without source by other people.  On the other hand, if I cannot
compile the library code and readily use the binary libraries
for many programs after compilation, then I have lost a major
benefit of libraries in the first place:  code reusability.

I feel that the failure of F90 to mandate a mechanism for the
USE facility makes re-use of libraries difficult;  even portable
Makefiles become difficult or impossible.  I reiterate that this
is a real drag even if one does have source.

Further, any language that fails to make it easy to use a binary-only
distribution is making most users do lots of work they shouldn't have
to do.  For instance, if I needed to do something to the source of
the C stdlib or stdio functions (or even have it on my system)
every time I wanted to write a program using malloc() or printf(),
I would certainly never write code in C.  The whole purpose of
writing libraries is so that users don't *have* to know anything
about the source, or even about the language the libraries are written
in.  Any language that requires the user of a library to know something
about the source language (other than the API) is failing in its
fundamental task:  to allow the user to utilize a computational
facility without understanding all the gory details of how it works.

> For example, I've observed (somewhat casually ;-) the long-term
> efforts, and problems, incurred trying to put decent exception
> handling into gcc, and it seems that most of the actual problems,
> and thus effort resolving them, revolves around catering to
> already-compiled binary code, where source is inconvenient or
> unavailable.

This sounds like a back-compatibility problem with existing code
which was developed before the new features were designed.  It
doesn't sound like a problem that would affect even proprietary
code developed with the new features in mind.

> I think it's not worth catering to these needs at all, or at a
> very low priority, in new-language design,

Ah, but C is an old language, and gcc an old dialect, by now.

> ... and leave it to the
> vendors of proprietary libraries and relevant tools to improve
> *their* products to meet *their* requirements as well as the
> (new) ones of the language environment.  (But I'm afraid too
> many of them would prefer the language be crippled for non-
> proprietary users to make their proprietary tools easier to build.)

I don't doubt that writers of proprietary code would be against
features that prevent them from keeping their code proprietary, but
I do have trouble imagining what such language features would look
like, and I also have trouble imagining useful language improvements
that would have this effect.

	-P.


-- 
************** In memoriam, Grandpa Jones, 1913-1998, R.I.P.
**************
* Peter S. Shenkin; Chemistry, Columbia U.; 3000 Broadway, Mail Code
3153 *
** NY, NY  10027;  shenkin@columbia.edu;  (212)854-5143;  FAX: 678-9039
***
*MacroModel WWW page:
http://www.columbia.edu/cu/chemistry/mmod/mmod.html *



  reply	other threads:[~1998-03-20  5:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-12  5:00 fortran error? Armin Leuprecht
1998-03-12  5:00 ` robin
1998-03-16  5:00 ` Steve Lionel
1998-03-17  5:00   ` Peter Shenkin
1998-03-17  5:00     ` Craig Burley
1998-03-17  5:00       ` Peter Shenkin
1998-03-18  5:00         ` Toon Moene
1998-03-18  5:00           ` Jeff Drummond
1998-03-19  5:00           ` Peter Shenkin
1998-03-18  5:00         ` Craig Burley
1998-03-19  5:00           ` Peter Shenkin
1998-03-19  5:00             ` Craig Burley
1998-03-20  5:00               ` Peter Shenkin
1998-03-20  5:00                 ` Richard Maine
1998-03-20  5:00                 ` Craig Burley
1998-03-20  5:00                   ` Peter Shenkin
1998-03-23  5:00                     ` Craig Burley
1998-03-23  5:00                       ` Summary (I hope) failure of automatic allocation; was, " Peter Shenkin
1998-03-24  5:00                         ` Craig Burley
1998-03-23  5:00                       ` Craig Burley
1998-03-23  5:00                         ` Peter Shenkin
1998-03-24  5:00                           ` Craig Burley
1998-03-24  5:00                             ` Nick Maclaren
1998-03-20  5:00                   ` Nick Maclaren
1998-03-20  5:00                     ` Richard Maine
1998-03-20  5:00               ` Nick Maclaren
1998-03-20  5:00             ` Dick Hendrickson
1998-03-20  5:00               ` Craig Burley
1998-03-20  5:00                 ` Peter Shenkin [this message]
1998-03-23  5:00                   ` Craig Burley
1998-03-20  5:00               ` Peter Shenkin
1998-03-18  5:00     ` Steve Lionel
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox