From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.lisp.guile.devel Subject: Re: when and unless Date: Tue, 06 Dec 2011 23:08:08 +0100 Message-ID: <87y5upicaf.fsf@fencepost.gnu.org> References: <878vsjd2fh.fsf@pobox.com> <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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1323209564 24681 80.91.229.12 (6 Dec 2011 22:12:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Dec 2011 22:12:44 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Dec 06 23:12:34 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 1RY3FY-0001Zr-IU for guile-devel@m.gmane.org; Tue, 06 Dec 2011 23:12:32 +0100 Original-Received: from localhost ([::1]:46415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RY3FX-0003GV-20 for guile-devel@m.gmane.org; Tue, 06 Dec 2011 17:12:31 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:38383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RY3FU-0003GQ-BZ for guile-devel@gnu.org; Tue, 06 Dec 2011 17:12:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RY3FS-0004qO-0M for guile-devel@gnu.org; Tue, 06 Dec 2011 17:12:28 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:45004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RY3FR-0004qK-Tr for guile-devel@gnu.org; Tue, 06 Dec 2011 17:12:25 -0500 Original-Received: from localhost ([127.0.0.1]:54923 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RY3FR-0000OH-FP; Tue, 06 Dec 2011 17:12:25 -0500 Original-Received: by lola (Postfix, from userid 1000) id 99686E0D58; Tue, 6 Dec 2011 23:08:09 +0100 (CET) In-Reply-To: <8739cxob6z.fsf@pobox.com> (Andy Wingo's message of "Tue, 06 Dec 2011 18:35:16 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 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:12998 Archived-At: Andy Wingo writes: > which is strictly unspecified, as it is returning an unexpected number > of values to a continuation. > > Guile 1.8: > > guile> (eqv? (values) (values)) > #f > > Guile 2.0: > > scheme@(guile-user)> (eqv? (values) (values)) > ERROR: In procedure values: > ERROR: Throw to key `vm-error' with args `(vm-run "Zero values returned to single-valued continuation" ())'. > > Not a nicely printed error, but oh well. > > Guile 2.0 returns a canonical unspecified value in this situation. I > would like to consider returning 0 values instead in the future, but > figuring out how to do so without breaking the world is tricky. It's > useful to hear about your experiences with *unspecified*. > >> I am working on a language where returning values in certain contexts >> might at one point of time might lead to the values being used. So I >> need to implement warnings to that effect in order to find out calls >> _not_ returning *unspecified*... > > Have you considered using `(values)' as your way of saying, "I'm not > returning any values"? Testing for that is not all that much fun. It is also rather useless since pretty much all of the call-for-effect functions of Guile return *unspecified* rather than (values). It is not clear to me why (values) can't just evaluate to a single *unspecified* just like '() evaluates to null. Outside of call-with-values, I don't see much need to treat it special. -- David Kastrup