From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Price Newsgroups: gmane.lisp.guile.devel Subject: Re: when and unless Date: Thu, 08 Dec 2011 18:10:16 +0000 Message-ID: <87y5un9bp3.fsf@Kagami.home> References: <87r50ircng.fsf@pobox.com> <4EDDC8B1.3000509@gentoo.org> <87mxb6kkzx.fsf@fencepost.gnu.org> <877h29oeeq.fsf@pobox.com> <877h29k5xs.fsf@fencepost.gnu.org> <8739cxob6z.fsf@pobox.com> <87y5upicaf.fsf@fencepost.gnu.org> <20111206230556.GA14717@yarrow.destinee.acro.gen.nz> <87liqoivle.fsf@fencepost.gnu.org> <20111207155834.GA15815@yarrow.destinee.acro.gen.nz> <87liqno3nn.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1323368033 12684 80.91.229.12 (8 Dec 2011 18:13:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2011 18:13:53 +0000 (UTC) Cc: guile-devel@gnu.org To: David Kastrup Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Dec 08 19:13:49 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 1RYiTc-0001IA-K6 for guile-devel@m.gmane.org; Thu, 08 Dec 2011 19:13:48 +0100 Original-Received: from localhost ([::1]:36758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYiTb-0001pL-Jb for guile-devel@m.gmane.org; Thu, 08 Dec 2011 13:13:47 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:46193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYiTZ-0001pG-Hs for guile-devel@gnu.org; Thu, 08 Dec 2011 13:13:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYiTY-0000HE-8r for guile-devel@gnu.org; Thu, 08 Dec 2011 13:13:45 -0500 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:41422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYiTY-0000H6-1B; Thu, 08 Dec 2011 13:13:44 -0500 Original-Received: by wgbdt11 with SMTP id dt11so3008983wgb.30 for ; Thu, 08 Dec 2011 10:13:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=pHXUKgeB/qB10M0qLTd5cqEIJYON2VKlzmpDpn0WzPg=; b=IguLZExCf2m0QDGN/L2cCbQ/7pqGDmGWkVm7cOacIoLUg8ReE4Kmo5FnHEdAbb0niP gTJ88SHtj5t54oJPWXzIWOF/hwx3VGPYmA0D2nQ6hgBNEoqIuu5UU4HVRof3gYlGXvUZ eFaRr5OdJ9OaNX3Fvzxikbs09Ae0ItcRcBTe0= Original-Received: by 10.216.166.205 with SMTP id g55mr3901wel.90.1323368022286; Thu, 08 Dec 2011 10:13:42 -0800 (PST) Original-Received: from Kagami.home (host86-168-32-36.range86-168.btcentralplus.com. [86.168.32.36]) by mx.google.com with ESMTPS id eo4sm9651778wib.19.2011.12.08.10.13.39 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 08 Dec 2011 10:13:40 -0800 (PST) In-Reply-To: <87liqno3nn.fsf@fencepost.gnu.org> (David Kastrup's message of "Thu, 08 Dec 2011 09:42:36 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 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:13019 Archived-At: David Kastrup writes: > So here is another proposal: (values) is not the same as *unspecified*. > But if you take the first value of a values list in single-value > contexts, there is nothing about that coercion mechanism that would keep > you from using *unspecified* whenever that values list would be empty. This seems like a special case of the, I think, CL behaviour where you get a nil for each of the values expected that were not explicitly returned. Not my preference, but certainly not the worst thing you can do. (As an aside, people who want this behaviour can use https://gist.github.com/1359350 which I wrote for dsmith a while back) > So you would have > > (length (call-with-values (lambda () *unspecified*) list)) => 1 > (length (call-with-values (lambda () (values)) list)) => 0 > (eq? (values) *unspecified*) => #t > > After all, you will also have > > (length (call-with-values (lambda () (values #t #t)) list)) => 2 > (length (call-with-values (lambda () #t) list)) => 1 > (eq? (values #t #t) #t) => #t > > and nobody seems all too worried about that, I guess. Some of us are, I think in the guile community this is a minority view. -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"