From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: when and unless Date: Tue, 06 Dec 2011 15:39:49 +0100 Message-ID: <87d3c1lq6i.fsf@gnu.org> References: <878vsjd2fh.fsf@pobox.com> <87r50ircng.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1323182412 30309 80.91.229.12 (6 Dec 2011 14:40:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Dec 2011 14:40:12 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Dec 06 15:40:06 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RXwBi-00019m-EF for guile-devel@m.gmane.org; Tue, 06 Dec 2011 15:40:06 +0100 Original-Received: from localhost ([::1]:55545 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXwBh-0003fX-N2 for guile-devel@m.gmane.org; Tue, 06 Dec 2011 09:40:05 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:58295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXwBa-0003eN-Gu for guile-devel@gnu.org; Tue, 06 Dec 2011 09:40:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXwBU-0007Aq-Jq for guile-devel@gnu.org; Tue, 06 Dec 2011 09:39:58 -0500 Original-Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:32225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXwBU-0007Ae-E1 for guile-devel@gnu.org; Tue, 06 Dec 2011 09:39:52 -0500 X-IronPort-AV: E=Sophos;i="4.71,306,1320620400"; d="scan'208";a="134177140" Original-Received: from unknown (HELO pluto) ([193.50.110.208]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 06 Dec 2011 15:39:49 +0100 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 Frimaire an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87r50ircng.fsf@pobox.com> (Andy Wingo's message of "Mon, 05 Dec 2011 21:23:15 +0100") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.134.164.82 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12979 Archived-At: Hi, Andy Wingo skribis: > On Thu 30 Jun 2011 12:44, Andy Wingo writes: > >> I think we should add `when' and `unless' to the default environment. >> >> They go like this: >> >> (define-syntax when >> (syntax-rules () >> ((_ test then then* ...) >> (if test (begin then then* ... (if #f #f)))))) >> >> (define-syntax unless >> (syntax-rules () >> ((_ test else else* ...) >> (if (not test) (begin else else* ... (if #f #f)))))) > > WDYT? `unless' is nice for assertions, `when' is its converse, and most > Schemes have them. I would like to add them to Guile too. Yes, feel free. Ludo=E2=80=99.