[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scheme BNF
Questions:
Answers and more questions:
- Does anyone object to defining (COND) and (CASE) to return unspecified
values? I think this would be a good idea.
I thought that COND and CASE with no match and no ELSE were already defined
to return unspecified values. If not, I think this should be the definition.
Can we also have (BEGIN) return an unspecified value instead of being invalid
syntax?
- Shouldn't backquote work on vectors? If not, then what's the rationale
for making them work on lists and not vectors?
I think it should not work on vectors. It makes sense to me only in non-
constants, and until we make a firm statement that vectors have some useful
meaning in Scheme other than as constants, backquote should not work within
vectors. I also have some amount of hesitance about splicing a list into
a vector, etc., and what that would mean.
- What kinds of constants should be allowed in CASE clauses? I don't
really care, but I can imagine two possible answers:
1. If EQV? is used ...
<case clause> ::= ((<casable>*) <sequence>)
<casable> ::= <boolean> | <number> | <character> | <symbol>
2. Use EQUAL? for comparisons, ...
<case clause> ::= ((<datum>*) <sequence>)
I do not like the use of EQUAL?. If you don't like <casable>, how about
<atom>? Seriously, we need some term anyway, since it is the same thing
accepted by EQV?. What about <simple>? Or <tag>?)
Also, it's been said before, but I think we should allow for the optional
syntax of a single "<casable>" not in a list.
<case clause> ::= (<datum> <sequence>)
- I definitely want like to flush the (<var>) syntax for iteration specs in
DO. It is inconsistent for DO to have this alternate form and not LET,
and I don't like either. Does anyone actually ever use it?
- I would also like to flush the (<var> <init>) syntax for DO iteration
specs. Does anyone ever use this? I always wrap the DO in a LET if I
need extra bindings. No replies from people who don't use DO, please.
I agree completely with your sentiments, and I do use DO.
- Oh yeah, I forgot to mention in my previous message that I would like to
document DELAY and FORCE, as non-essential special form and procedure,
respectively. I believe they're non-controversial, and desirable given
that they have a central role in S&ICP and are a little tricky to
describe and implement.
If you don't mind, please send out your prose for these and include the
appropriate code for them. I don't have them in Chez Scheme yet and I'm
not in the mood to think.
Picky comment:
I am uncomfortable with the use of <sequence> in light of the existence
of sequence as a special form. Furthermore, I think that <expression>+
would be more expressive where it appears, and in Scheme there should be
no confusion with the operator + or sign +.