From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: when and unless Date: Mon, 05 Dec 2011 21:23:15 +0100 Message-ID: <87r50ircng.fsf@pobox.com> References: <878vsjd2fh.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1323116614 4921 80.91.229.12 (5 Dec 2011 20:23:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Dec 2011 20:23:34 +0000 (UTC) Cc: guile-devel To: ludo@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Dec 05 21:23:28 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 1RXf4P-0002so-Fa for guile-devel@m.gmane.org; Mon, 05 Dec 2011 21:23:25 +0100 Original-Received: from localhost ([::1]:34733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXf4O-0004ns-QB for guile-devel@m.gmane.org; Mon, 05 Dec 2011 15:23:24 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:51690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXf4L-0004nP-JG for guile-devel@gnu.org; Mon, 05 Dec 2011 15:23:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXf4K-0002JB-Cl for guile-devel@gnu.org; Mon, 05 Dec 2011 15:23:21 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:35988 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXf4K-0002J7-AD; Mon, 05 Dec 2011 15:23:20 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 9F2398AAA; Mon, 5 Dec 2011 15:23:19 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=6nxZBEqWNsII+fLPQEi5kOXIad8=; b=ZEMyjO IcsbfnLobk0A5kKy1b4SrU2TEFsCdt07NIxGwjz2rrDj4qjLU1crBhh9WtKkeHtk +ru9KWIvuE+HNp1F+Rk6QCcjygAbgBrFQi9YOew2Rda+FMmOGjW6kvmqNHAVOvMy VDtFykW96h7xrzPaqRyjFaDU8z5zqBb2C6H7o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=HX7xpXo3YZuRj9nEwchwp44vtUPYdL7C S40bAdK5R3m6HYo6xfh+TaxroNSKa9z/w9/YmxZQTuR8G8SFoOCZAXlRHD5yBBFs GSoXhe3y2vfz4CFUCDfTSROGRQhqWTykSkqVAM6oXRdOI3H1t5c+0YP5YAK6Y72F hYgavLGitD0= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 982148AA9; Mon, 5 Dec 2011 15:23:19 -0500 (EST) Original-Received: from badger (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 1490A8AA8; Mon, 5 Dec 2011 15:23:18 -0500 (EST) In-Reply-To: <878vsjd2fh.fsf@pobox.com> (Andy Wingo's message of "Thu, 30 Jun 2011 12:44:02 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: F8716D16-1F7E-11E1-9039-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 74.115.168.62 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:12971 Archived-At: Heya Ludo, 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. Andy -- http://wingolog.org/