Discussion:
[Scheme-reports] R7RS-small draft ratified by Steering Committee
John Cowan
2013-11-08 17:57:32 UTC
Permalink
The final draft of R7RS-small has been ratified by a unanimous vote of
the Scheme Language Steering Committee. A formal announcement will be
made by the SLSC at the Scheme 2013 workshop.

The final draft, post-final errata, and the TeX source of the draft
are available at:

<http://trac.sacrideo.us/wg/raw-attachment/wiki/WikiStart/r7rs.pdf>
<http://trac.sacrideo.us/wg/wiki/R7RSSmallErrata>
<http://trac.sacrideo.us/wg/raw-attachment/wiki/WikiStart/r7rs-small-spec.zip>

Comments and discussion are encouraged on the scheme-***@scheme-reports.org
mailing list, as always.
--
A rose by any other name John Cowan
may smell as sweet, http://www.ccil.org/~cowan
but if you called it an onion ***@ccil.org
you'd get cooks very confused. --RMS
ceving
2014-07-11 17:58:39 UTC
Permalink
Post by John Cowan
The final draft of R7RS-small has been ratified by a unanimous vote of
the Scheme Language Steering Committee.
<http://trac.sacrideo.us/wg/raw-attachment/wiki/WikiStart/r7rs.pdf>
The new standard seems to ban Guile's 1+ operator. It must be quoted in
R7RS |1+|.
John Cowan
2014-07-11 18:52:15 UTC
Permalink
Post by ceving
The new standard seems to ban Guile's 1+ operator. It must be quoted in
R7RS |1+|.
True. Then again, it wasn't valid R5RS either, or R4RS or even R3RS;
R2RS was the only Scheme standard to explicitly allow it, almost thirty
years ago.

The theory of R7RS identifiers is that they can't have a prefix which
is a valid number. In practice, many Schemes simply attempt to parse
an alphanumeric sequence as a number, and if that fails, accept it as
an identifier.
--
John Cowan http://www.ccil.org/~cowan ***@ccil.org
Consider the matter of Analytic Philosophy. Dennett and Bennett are well-known.
Dennett rarely or never cites Bennett, so Bennett rarely or never cites Dennett.
There is also one Dummett. By their works shall ye know them. However, just as
no trinities have fourth persons (Zeppo Marx notwithstanding), Bummett is hardly
known by his works. Indeed, Bummett does not exist. It is part of the function
of this and other e-mail messages, therefore, to do what they can to create him.
Sanel Zukan
2014-07-11 21:23:58 UTC
Permalink
Hi,

Is this means that we are no longer allowed to write and support
someting like:

(define (1+x x) (+ 1 x))

?

Best,
Sanel
Post by John Cowan
Post by ceving
The new standard seems to ban Guile's 1+ operator. It must be
quoted in R7RS |1+|.
True. Then again, it wasn't valid R5RS either, or R4RS or even R3RS;
R2RS was the only Scheme standard to explicitly allow it, almost
thirty years ago.
The theory of R7RS identifiers is that they can't have a prefix which
is a valid number. In practice, many Schemes simply attempt to parse
an alphanumeric sequence as a number, and if that fails, accept it as
an identifier.
John Cowan
2014-07-12 01:18:43 UTC
Permalink
Post by Sanel Zukan
Is this means that we are no longer allowed to write and support
(define (1+x x) (+ 1 x))
?
If you are an implementer, you certainly can provide such a procedure.

If you are a user, and you care about standards conformance,
you should choose a different identifier, as 1+x has never been a
standards-conformant identifier under *any* version of the Scheme
standard. However, most Scheme implementations will accept 1+x as a
valid identifier.
--
John Cowan http://www.ccil.org/~cowan ***@ccil.org
In computer science, we stand on each other's feet. --Brian K. Reid
Alex Shinn
2014-07-12 06:14:33 UTC
Permalink
Post by John Cowan
Post by Sanel Zukan
Is this means that we are no longer allowed to write and support
(define (1+x x) (+ 1 x))
?
If you are an implementer, you certainly can provide such a procedure.
If you are a user, and you care about standards conformance,
you should choose a different identifier, as 1+x has never been a
standards-conformant identifier under *any* version of the Scheme
standard. However, most Scheme implementations will accept 1+x as a
valid identifier.
There are actually many implementations for which this
is an error. Notably R6RS requires it to be an error.

Schemes typically use the name `add1' for this.
--
Alex
John Cowan
2014-07-12 07:03:46 UTC
Permalink
There are actually many implementations for which this is an error.
Notably R6RS requires it to be an error.
Not too many outside R6RS, actually: only RScheme, SXM, SigScheme, UMB,
Dfsch, Foment, Chibi.
Schemes typically use the name `add1' for this.
This is only available (at least at the REPL) in Racket, Chicken, SISC,
Sizzle, Vicare, IronScheme, RScheme, SXM.

See <http://trac.sacrideo.us/wg/wiki/PlusOneEx> for details.
--
John Cowan http://www.ccil.org/~cowan ***@ccil.org
Deshil Holles eamus. Deshil Holles eamus. Deshil Holles eamus.
Send us, bright one, light one, Horhorn, quickening, and wombfruit. (3x)
Hoopsa, boyaboy, hoopsa! Hoopsa, boyaboy, hoopsa! Hoopsa, boyaboy, hoopsa!
--Joyce, Ulysses, "Oxen of the Sun"
Alex Shinn
2014-07-12 07:22:22 UTC
Permalink
Post by John Cowan
There are actually many implementations for which this is an error.
Notably R6RS requires it to be an error.
Not too many outside R6RS, actually: only RScheme, SXM, SigScheme, UMB,
Dfsch, Foment, Chibi.
Schemes typically use the name `add1' for this.
This is only available (at least at the REPL) in Racket, Chicken, SISC,
Sizzle, Vicare, IronScheme, RScheme, SXM.
That's still a lot more than provide 1+ out of the box (do any
other than Guile?).

See <http://trac.sacrideo.us/wg/wiki/PlusOneEx> for details.
You tested the wrong thing - the original question was about
1+, then 1+x was brought up, not +1x.
--
Alex
John Cowan
2014-07-12 17:41:38 UTC
Permalink
That's still a lot more than provide 1+ out of the box (do any other
than Guile?).
Provide `1+` but not `add1`: MIT, Guile, SCM, XLisp, Rep, Elk, FemtoLisp,
Inlab.

Provide `add1` but not `1+`: Racket, Chicken, SISC, Vicare, IronScheme,
RScheme, SXM.

Provide both: Chez, Sizzle.

So as far as counting Schemes go, it's a wash; but since almost the
beginning of this process I have adopted the rule "witnesses should be
weighed, not counted."
Post by John Cowan
See <http://trac.sacrideo.us/wg/wiki/PlusOneEx> for details.
You tested the wrong thing - the original question was about
1+, then 1+x was brought up, not +1x.
I actually tested the right thing, but reported it wrongly. (Post in
haste, repent at leisure.) In any case, the tests for 1+ are now merged
in and some errors corrected. We are stuck with the wrong page name,
though.
--
John Cowan http://www.ccil.org/~cowan ***@ccil.org
But the next day there came no dawn, and the Grey Company passed on
into the darkness of the Storm of Mordor and were lost to mortal sight;
but the Dead followed them. --"The Passing of the Grey Company"
John Boyle
2014-07-11 19:03:49 UTC
Permalink
I'm guessing you're looking at section "2.1. Identifiers", specifically
this quote:

"An identifier is any sequence of letters, digits, and “extended identifier
characters” provided that it does not have a prefix which is a valid
number."

Since "1+" has the prefix "1", which is a valid number, I would agree that
R7RS does not require implementations to parse "1+" as an identifier, and
if you wrote a program using an un-escaped 1+, you could not be sure it
would run on all implementations. However, I think it is *permitted* for
implementations to recognize additional tokens as identifiers. R7RS does
not say that 1+ is a number, or anything else, and I don't think it
requires the reader to raise an exception, so if Guile accepts it as an
identifier, that doesn't seem to disqualify Guile as a conforming
implementation.

--John Boyle
*Science is what we understand well enough to explain to a computer. Art is
everything else we do.* --Knuth
Post by ceving
Post by John Cowan
The final draft of R7RS-small has been ratified by a unanimous vote of
the Scheme Language Steering Committee.
<http://trac.sacrideo.us/wg/raw-attachment/wiki/WikiStart/r7rs.pdf>
The new standard seems to ban Guile's 1+ operator. It must be quoted in
R7RS |1+|.
_______________________________________________
Scheme-reports mailing list
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
Peter Bex
2014-07-12 11:38:02 UTC
Permalink
Post by ceving
Post by John Cowan
The final draft of R7RS-small has been ratified by a unanimous vote of
the Scheme Language Steering Committee.
<http://trac.sacrideo.us/wg/raw-attachment/wiki/WikiStart/r7rs.pdf>
The new standard seems to ban Guile's 1+ operator. It must be quoted in
R7RS |1+|.
Could you please refrain from CCing this many mailinglists? This thread
exploded into my mailbox: I got three copies of your mail, plus each
reply in this thread!

I don't think this is very relevant to chicken-users, and not very much
for chicken-hackers either. Same goes for the chibi-scheme list.

Cheers,
Peter
--
http://www.more-magic.net
Loading...