unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Wolfgang J Moeller <wjm@heenes.com>
To: Andy Wingo <wingo@pobox.com>
Cc: bug-guile@gnu.org, guile-devel <guile-devel@gnu.org>
Subject: Re: [shift and reset, plus] "while"
Date: Wed, 13 Apr 2011 19:31:32 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LNX.2.00.1104131810330.3553@gwdw03.gwdg.de> (raw)
In-Reply-To: <m3y63ef9am.fsf@unquote.localdomain>

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	other threads:[~2011-04-13 17:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LNX.2.00.1104041402090.26447@gwdw03.gwdg.de>
2011-04-13  9:47 ` shift and reset, plus "while" Andy Wingo
2011-04-13 14:56   ` [shift and reset, plus] "while" Wolfgang J Moeller
2011-04-13 15:41     ` Andy Wingo
2011-04-13 17:31       ` Wolfgang J Moeller [this message]
2011-04-28 12:15         ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.00.1104131810330.3553@gwdw03.gwdg.de \
    --to=wjm@heenes.com \
    --cc=bug-guile@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).