[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New draft
Marc Feeley <email@example.com> writes:
> The new syntax does away with the `#!optional', `#!key' and `#!rest'
> markers. Instead, a syntax that is inspired from EBNF is used to
> denote optional parts (square brackets in the parameter list around
> the optional parameters).
Considering that R6RS will standardize brackets as being
equivalent to parentheses, this SRFI will also allow
(define (myproc required (optional #f) (key: key #t))
I assume this is intended, and I want to state that I like this
syntax, and I definitively prefer it very much over the old.
It /might/ be preferable to some people if this SRFI would specify
LAMBDA-KW and DEFINE-KW special forms (the names up for debate of
course) instead of shadowing R5RS’ forms. A useful module system
can be used to explicitly shadow the R5RS forms if someone
requires the extended capabilities in LAMBDA and DEFINE itself.
This SRFI allows the following function definition:
(define (foo (bar: bar 2) (baz 3))
But for this procedure, it would disallow the analogical
(foo bar: 5 'baz-value)
In this example, BAZ is bound to the keyword BAR:, and the
application then is invalid due to too many arguments. To make
this dependence on order explicit, I think it would be useful to
only allow optional arguments to be specified before keyword
 The March 2005 R6RS Status Report
((email . "firstname.lastname@example.org") (www . "http://www.forcix.cx/")
(gpg . "1024D/028AF63C") (irc . "nick forcer on IRCnet"))
- New draft
- From: Marc Feeley <email@example.com>