Re: [Scheme-reports] Draft 3 Comments: Chapter 4 Denis Washington (27 Jul 2011 15:39 UTC)
Re: [Scheme-reports] Draft 3 Comments: Chapter 4 John Cowan (27 Jul 2011 16:57 UTC)
Re: [Scheme-reports] Draft 3 Comments: Chapter 4 Denis Washington (27 Jul 2011 19:00 UTC)
Re: [Scheme-reports] Draft 3 Comments: Chapter 4 John Cowan (27 Jul 2011 19:38 UTC)
Re: [Scheme-reports] Draft 3 Comments: Chapter 4 Andre van Tonder (27 Jul 2011 17:22 UTC)
Re: [Scheme-reports] Draft 3 Comments: Chapter 4 Denis Washington (27 Jul 2011 18:36 UTC)

Re: [Scheme-reports] Draft 3 Comments: Chapter 4 John Cowan 27 Jul 2011 16:54 UTC

Denis Washington scripsit:

> Thinking about it, leaving this unspecified makes sense as one couldn't
> use "when" and "unless" to return a value from a procedure anyway
> without risking an unspecified return value (if the test evaluates to #f
> or #t, respectively).
>
> On the other hand, "begin" in an expression context also a sole
> side-effect construct (otherwise, all expressions except the last in a
> "begin" form would be useless) and still returns the last expression's
> result. Given that "when" and "unless" are very similar, I find it to be
> pretty intuitive if they have the same behavior. I'm undecided.

The difference is that BEGIN can have a value if its last argument does, but
you can't ever rely on WHEN or UNTIL having a value, so you can only
use it for effect portably.  That being so, it might as well return
an unspecified value in all cases.

> Maybe optional arguments should should be done in WG2 instead (together
> with keyword arguments, maybe). However, this has been voted upon
> already by the working group, so I haven't commented on the decision.

Optional arguments are on the WG2 docket.

Keyword arguments can be done in R5RS without extra machinery, provided you
are willing to export them as identifiers:  see KeywordsArcfide.

--
BALIN FUNDINUL          UZBAD KHAZADDUMU        cowan@ccil.org
BALIN SON OF FUNDIN     LORD OF KHAZAD-DUM      http://www.ccil.org/~cowan

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