From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hans Aberg Newsgroups: gmane.lisp.guile.bugs Subject: Re: GIT version: values Date: Thu, 27 Jan 2011 14:20:32 +0100 Message-ID: <79B58A21-FBAE-4F0E-A045-633D3307502F@telia.com> References: <162CAAE3-D2D8-4894-9B9F-3397348DCFA2@telia.com> <29B3FB6E-6F73-40B2-A8D0-DB16B70656BB@telia.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1296134532 21527 80.91.229.12 (27 Jan 2011 13:22:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 27 Jan 2011 13:22:12 +0000 (UTC) Cc: bug-guile@gnu.org To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Jan 27 14:22:07 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PiRnV-0001rl-Qm for guile-bugs@m.gmane.org; Thu, 27 Jan 2011 14:22:04 +0100 Original-Received: from localhost ([127.0.0.1]:39761 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiRnR-0008Gd-MO for guile-bugs@m.gmane.org; Thu, 27 Jan 2011 08:21:57 -0500 Original-Received: from [140.186.70.92] (port=34930 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiRmC-0007Xs-J1 for bug-guile@gnu.org; Thu, 27 Jan 2011 08:20:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiRm8-000314-7V for bug-guile@gnu.org; Thu, 27 Jan 2011 08:20:40 -0500 Original-Received: from smtp-out11.han.skanova.net ([195.67.226.200]:56965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PiRm7-00030V-Rf for bug-guile@gnu.org; Thu, 27 Jan 2011 08:20:36 -0500 Original-Received: from [10.0.1.200] (217.210.127.13) by smtp-out11.han.skanova.net (8.5.133) (authenticated as u26619196) id 4D0756AC00E9594D; Thu, 27 Jan 2011 14:20:33 +0100 In-Reply-To: X-Mailer: Apple Mail (2.936) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5055 Archived-At: On 27 Jan 2011, at 10:00, Andy Wingo wrote: >>> If you wish to preserve a potentially >>> multiply-valued return, you will need to set up a multiple-value >>> continuation, using `call-with-values'. >> >> But this is false. > > According to the standard, passing an unintended number of values to a > continuation is undefined. Right. Because of this, no extension is reliable - can be changed in the future. > To portably preserve a potentially > multiply-valued return, you need call-with-values. > > You can still implement other paradigms on top of this. If you want > to > express some semantics that is not specified in the report, write a > macro that wraps your expressions in call-with-values. This is > effectively what we will do for Lua, for example. Yes, this is what I do, first by a macro, and now, via a new tuple type (right now a smob), a function call. But tuples might be integrated into Scheme, so that the underlying call-with-values become transparent. For example, if (lambda x a) would have made the multiple values that x picks up as 'values', then (lambda x x) becomes the identity. Now this syntax is occupied, but it illustrates the idea.