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 writing Date: Thu, 20 Jan 2011 17:51:51 +0100 Message-ID: <140431E4-7361-4F1B-A0E4-199E1272E67A@telia.com> References: <87fwsnzju6.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1295542335 29388 80.91.229.12 (20 Jan 2011 16:52:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 20 Jan 2011 16:52:15 +0000 (UTC) Cc: bug-guile@gnu.org To: =?ISO-8859-1?Q?Ludovic_Court=E8s?= Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Jan 20 17:52:11 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 1Pfxjz-0007ot-SS for guile-bugs@m.gmane.org; Thu, 20 Jan 2011 17:52:08 +0100 Original-Received: from localhost ([127.0.0.1]:55569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pfxjz-0001bP-Bs for guile-bugs@m.gmane.org; Thu, 20 Jan 2011 11:52:07 -0500 Original-Received: from [140.186.70.92] (port=47979 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pfxjo-0001ZP-4J for bug-guile@gnu.org; Thu, 20 Jan 2011 11:51:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pfxjm-0005q4-Sg for bug-guile@gnu.org; Thu, 20 Jan 2011 11:51:55 -0500 Original-Received: from smtp-out12.han.skanova.net ([195.67.226.212]:60996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pfxjm-0005pP-Il; Thu, 20 Jan 2011 11:51:54 -0500 Original-Received: from h131n2-fre-d2.ias.bredband.telia.com (78.72.157.131) by smtp-out12.han.skanova.net (8.5.133) (authenticated as u26619196) id 4D065C290098A73D; Thu, 20 Jan 2011 17:51:52 +0100 In-Reply-To: <87fwsnzju6.fsf@gnu.org> 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:4986 Archived-At: On 20 Jan 2011, at 16:16, Ludovic Court=E8s wrote: >> There seems to be a bug in GIT version when writing the 'values' data >> type. >> (list 2 (values 3 4) 5) >> $1 =3D (2 3 5) > > This behavior is correct: in Guile 1.9, multiple-value returns are > truncated any time the continuation expects fewer values. > > Here, the =91values=92 call returns 3 values, but the location where = it=92s > called expects only 1, hence the automatic truncation. After the post, I saw that R5RS says the behavior is undefined. However, quietly loosing values is inviting bugs. >> with the value 4 lost In guile-1.8.8, it would write >> (2 # 5) > > The special =93values=94 type in older Guile versions was an artifact = of > Guile=92s implementation of multiple value support; objects of that = type > are normally invisible to user code, but they would show up in such > situations (R5RS doesn=92t specify what to do in these cases, so it = was > valid, but implementation-specific behavior.) The old style is a reification of the values, and could be turned into =20= a tuples object. The latter is what I am implementing, but I can make =20= my own type instead. It is discussed here, along with some other ideas. = https://groups.google.com/group/comp.lang.scheme/browse_thread/thread/b72d= 987aa6626cd2/e2f7cfa55fb51d55?hl=3Den=