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: Wed, 07 Dec 2011 15:19:58 +0100 Message-ID: <87ehwg5ur5.fsf@gnu.org> References: <878vsjd2fh.fsf@pobox.com> <87r50ircng.fsf@pobox.com> <87d3c1lq6i.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1323267637 22059 80.91.229.12 (7 Dec 2011 14:20:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Dec 2011 14:20:37 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Dec 07 15:20:30 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 1RYIMH-0004gM-Ka for guile-devel@m.gmane.org; Wed, 07 Dec 2011 15:20:29 +0100 Original-Received: from localhost ([::1]:35368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYIMG-0003Ww-RV for guile-devel@m.gmane.org; Wed, 07 Dec 2011 09:20:28 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:45154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYIM5-0003Wk-Tp for guile-devel@gnu.org; Wed, 07 Dec 2011 09:20:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYIM0-0007Ll-6n for guile-devel@gnu.org; Wed, 07 Dec 2011 09:20:17 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:59211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYILz-0007Lf-W0 for guile-devel@gnu.org; Wed, 07 Dec 2011 09:20:12 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RYILy-0004Wp-1K for guile-devel@gnu.org; Wed, 07 Dec 2011 15:20:10 +0100 Original-Received: from eduroam-083a.sophia.inria.fr ([193.48.247.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 07 Dec 2011 15:20:10 +0100 Original-Received: from ludo by eduroam-083a.sophia.inria.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 07 Dec 2011 15:20:10 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: eduroam-083a.sophia.inria.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 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 User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:RoEQ/cVm67Fb/Q2g1RKlTVksBjU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:13004 Archived-At: Hi, ludo@gnu.org (Ludovic Courtès) skribis: > 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. Like Marijn, it seems more natural for me to return the values of the body’s last expression, rather than *unspecified*. Thanks, Ludo’.