| From: "R. Kent Dybvig" <[EMAIL PROTECTED]>
 | Date: Sun, 11 Mar 2007 22:38:18 -0400
 | 
 | I'm responding as a user/implementor, not speaking for the editors.
 | 
 | > This is mainly an attempt to stimulate discussion: Given that
 | > `when' and `unless' offer little advantage over just using `if',
 | > and given that their definitions are so trivial, it's unclear
 | > whether the benefit of having a separate library with these in
 | > the standard is worth the cost.  As I don't use `when' and
 | > `unless', it's clear that they're not worth the cost to me.  I
 | > wonder what others think.
 | 
 | The first "given" is debatable---I believe that when and unless
 | make the programmers intent immediately clear while one-armed if
 | can be mistaken on first glance for a two-armed if.  when and
 | unless also both include an implicit begin, which is sometimes
 | convenient.

COND also has implicit BEGINs; and COND can be extended to
alternatives by adding clauses.

"(when condition . stmts)" is a savings of 2 characters over
"(cond (condition . stmts))".

"(unless condition . stmts)" is a savings of 6 characters over
"(cond ((not condition) . stmts))".

 | I agree that a separate library is a bit silly.  I wouldn't mind if
 | they were in the base library.

They save little typing and add no expressiveness to the language over
COND.  I would prefer they have no standing in R6RS.

 | I wonder how many people would support eliminating one-armed if
 | from the language.

Appendix A: "Sample Definitions for Derived Forms" uses one-armed IF
in two places.  Eliminating one-armed IF would require artifice for
cases like:

  (COND (#f)) ==> #<unspecified>

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to