[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shift and reset, plus] "while"

From: Wolfgang J Moeller
Subject: Re: [shift and reset, plus] "while"
Date: Wed, 13 Apr 2011 19:31:32 +0200 (CEST)

On Wed, 13 Apr 2011, Andy Wingo wrote:

> >From Guile 1.6:
> It did indeed happen to return #t on a normal termination, and have
> (break ARG).  It has lots of other bugs though.  I would prefer (break)
> to return zero values, and (while #f 1) as well, but that is
> incompatible with 2.0.  Bummer.

OK, that explains why I have an old & lengthy program that does use
(break arg), and why I had to keep my macro compatible.

Last resort: Once we do allow for argument(s) to (break),

   (while #t ... (break x) ... (break y) ...)

allows for full functionality, plus returning all well-defined results,
without necessarily requiring well-defined (or even different) results
from (break) and (while #f).

Only that this construct might better be called "loop/return" ...

Given the situation at V2.0.0, with the only results being
#<unspecified> and #t (plus compiler error!), and [at least]
V1.8.5 returning nothing but #<unspecified>, I find it hard
to believe that (break) ==> #t had found an application yet.

Or maybe someone can come up with a pretty formulation
of a newly invented "do-until/break/continue" combo ...

> > Not exactly tricky - see my code's prompt handler.
> I didn't mean in terms of code; I meant in terms of documentation,
> interface, expectations, etc...

Indeed. I'd like to say thanks to the authors of the new/improved GUILE manual.
Real good. E.g. finally, a description of "syntax-case" that I'd understand
(as opposed to R6RS ;-)!

Best regards,

Wolfgang J. Moeller, Tel. +49 551 47361, wjm<AT>heenes.com
37085 Goettingen, Germany | Disclaimer: No claim intended!
http://www.wjmoeller.de/ -+-------- http://www.heenes.com/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]