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

[Scheme-reports] Two Informal Comments on r7rs Small, draft 9



Here are two informal comments on r7rs Small, draft 9, of the
proposed standard.

ad begin:

Here is the beginning of Section 4.2.3:

   4.2.3. Sequencing

   Both of Scheme's sequencing constructs are named begin,
   but the two have slightly different forms and uses:

I think the two meanings of "begin" are so different that each
should have its own name.  One might be "begin-splice", or
"splice", the other "begin".  And what, there is yet a third
meaning for "begin", when used in a library declaration?  I do
not understand enough about libraries, thus not enough about this
third meaning, to say much.  But if it really is a third meaning,
it looks like "splice" to me on a first reading, then it should
have a third different name, though I do not like the increase in
size of the list of official names.

I believe that there is a suggestion of something like the two
different meanings of "begin" in r5rs, though the explanations of
the two meanings do not appear together.  The "begin" that
returns a value is defined in 4.2.3 Sequencing.  The
"begin-splice" definition appears in Section 5.1 Programs.  I
think I had not, before today, noticed that "begin" has two
meanings in r5rs.  But whether there is a difference in behavior
is not clear to me, because of this behavior of the top-level:
things get evaluated in order of typing and displayed on the
screen in the same order.  So, at top level, the last thing in
the "splice" expression will just be evaluated and displayed,
just the same as if wrapped if the "splice" were a proper
"begin".

OK, now I think I get why "splice" and the "begin" that returns a
value might be notationally conflated: Because all <body>'s in
r7rs small, draft 9, include an implicit "begin" at the start of
the list of things which make up the body.  Oi.  I do not know
what to say here, except that, in my code, I always wrap lambda
bodies that are not a single expression in a begin.  This is to
declare openly to myself, in this particular case, the sometimes
un-admitted homomorphism from notation to object.  In this case,
the notation includes the order of expressions in the body as
they appear on the page, and the object includes the time order
of execution of the code.


ad equality of procedures:

I agree with the proposed and agreed to, but not yet incorporated,
reversion to the rule of r5rs.  Gerald Sussman, in

   http://lists.scheme-reports.org/pipermail/scheme-reports/2013-April/003352.html

makes the argument that

   (let ((p (lambda (x) x)))
     (eqv? p p))             ==> unspecified

which appears in r7rs's Section 6.1. Equivalence predicates
should be reverted to r5rs's

   (let ((p (lambda (x) x)))
     (eqv? p p))              ==>  #t

which appears in r5rs's Section 6.1.  Gerald Sussman's argument,
and the discussion following, persuade me.

oo--JS.


_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports