Related articles |
---|
[2 earlier articles] |
incremental compilation via shared library brent@jade.ssd.csd.harris.com (1993-08-30) |
Re: incremental compilation via shared library pardo@cs.washington.edu (1993-09-02) |
Re: incremental compilation via shared library assmann@prosun.first.gmd.de (1993-09-03) |
Re: incremental compilation via shared library brett@digits.enet.dec.com (1993-09-07) |
Re: incremental compilation via shared library pop@dcs.gla.ac.uk (pop) (1993-09-07) |
Re: incremental compilation via shared library pcg@decb.aber.ac.uk (1993-09-11) |
Re: incremental compilation via shared library tmb@arolla.idiap.ch (1993-09-20) |
Re: incremental compilation via shared library brent@jade.ssd.csd.harris.com (1993-09-20) |
Re: incremental compilation via shared library pcg@aber.ac.uk (1993-09-21) |
Re: incremental compilation via shared library jeremy@suite.sw.oz.au (1993-09-22) |
Re: incremental compilation via shared library gym@dcs.ed.ac.uk (Graham Matthews) (1993-09-22) |
Newsgroups: | comp.compilers |
From: | tmb@arolla.idiap.ch (Thomas M. Breuel) |
Keywords: | design, OOP, Lisp |
Organization: | IDIAP (Institut Dalle Molle d'Intelligence Artificielle Perceptive) |
References: | 93-08-104 93-09-041 |
Date: | Mon, 20 Sep 1993 04:07:50 GMT |
pop <pop@dcs.gla.ac.uk> writes:
|> The SML compilers are a compromise which is not too happy, in my opinion.
|> Consider the sequence:
|>
|> fun fred x = 34;
|> fun joe x = fred x + 45;
|> fun fred x = 45;
|>
|> Now in POP-11 or LISP, the redefinition of -fred- would be reflected in the
|> meaning of -joe-. But not in SML, which takes the no-doubt-rigorous view
|> that the meaning of -fred- in -joe- is what it was when joe was compiled.
I think we should keep apart language semantics and development
environment. Semantically, the SML behavior is preferable, in my opinion
(an acceptable alternative being that an error gets flagged). However,
redefinitions must clearly be possible if you want to be able to develop
interactively without excessive (read: C-like) recompilations.
Unfortunately, the current state of affairs is the following. Existing
SML environments are not sophisticated enough to allow the simple
re-definition of "fred". If you want to re-define "fred", you have to
re-load "joe" afterwards. (The reason for this is not that the
redefinition itself would be hard to implement, but that the systems have
no idea whatsoever what to do in the case of type errors.)
On the other hand, most Lisp environments will let you blissfully redefine
most existing functions accidentally without any indication that you are
breaking something in a bad way.
What's the solution? I think the whole notion of "loading" and "defining"
as an imperative change to the programming environment is wrong. What you
really want is something declarative. In effect, you want to say to your
interactive development environment "I'm done editing; these are my
sources; bring your internal state into harmony with them as quickly as
possible.".
This could be done via a tight integration of programming environment and
compiler (and has been attempted, numerous times). Ultimately, I think
that's a losing proposition, though: many people don't want to be tied to
a particular programming environment. A more down-to-earth system would
be something that keeps track of source code modifications not on a
per-file level (akin to make), but on a per-function or per-line level.
Thomas.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.