GNU bug report logs - #17474
Making *unspecified* equivalent to (values) would seem convenient

Previous Next

Package: guile;

Reported by: David Kastrup <dak <at> gnu.org>

Date: Mon, 12 May 2014 11:41:01 UTC

Severity: wishlist

Tags: patch

Full log


Message #29 received at 17474 <at> debbugs.gnu.org (full text, mbox):

From: David Kastrup <dak <at> gnu.org>
To: Mark H Weaver <mhw <at> netris.org>
Cc: 17474 <at> debbugs.gnu.org
Subject: Re: bug#17474: Another point
Date: Sun, 22 Jun 2014 07:45:04 +0200
Mark H Weaver <mhw <at> netris.org> writes:

> David Kastrup <dak <at> gnu.org> writes:
>
>> It is worth pointing out that the current state of Guile is inconsistent
>> regarding the return value of control structures: one primitive control
>> structure builder is call/cc, and its normal use does not return
>> *unspecified* but (values):
>>
>> scheme@(guile-user)> (call-with-values (lambda () (call/cc (lambda
>> (exit) (exit)))) list)
>> $5 = ()
>
> The values returned are the arguments passed to 'exit'.  Normal use is
> to pass the desired return value(s) to 'exit'.

Well, that's the point.  You'll not see anybody using a particular value
like *unspecified* for his control structures built from Scheme
primitives, and yet the C API recommends returning SCM_UNSPECIFIED.

-- 
David Kastrup




This bug report was last modified 10 years and 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.