[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Full Specification



``Full compliance with a semantic model'' does not necessarily imply that, for
example, the SET! form must have a defined return value.  It simply means that
the semantics must show a small piece of nondeterminism, in the same way that it
now uses the ``implementation-dependent'' function ``permute'' in order to dodge
the question of argument evaluation order.

You say ``one really expects the definitions in a body to be accomplished in
order''.  I don't.  Maybe I'm strange, but I've never considered using internal
define's for anything but local procedures, whose order of evaluation is
irrelevant.

I am opposed strongly to all three of your proposals.

I have never believed that the return value of things like ``write'' and
``set-car!'' had a reasonable justification in languages like Common Lisp and it
makes more sense for these procedures (and the set! expression) to return no
value at all.  I find code that uses the return value of such constructs
considerably harder to read.  Code that does not do this is, yes, frequently
more verbose, but always more readable.

A significant source of first-level optimization is the lack of a defined
argument-evaluation order in the language.  It is almost always more convenient,
for example, to evaluate the function form last, after all of the arguments have
been evaluated.  Also, in my experience, code that depends upon left-to-right
order (in those languages that guarantee it) is again always harder to read.

Requiring the implementation of internal defines to signal an error if
<undefined> is referenced is quite possibly too expensive for many applications.
In addition, I dislike the notion of encouraging people to write series of
internal defines that are sensitive to evaluation order.  It goes against what I
consider to be the clean and readable purpose of such defines: binding local
procedures.

       ``And of course there are more, but that is enough to test the water.''

This reader sees sharks in the water...

	Pavel