From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.user Subject: Re: A value for "nothing" Date: Tue, 28 Aug 2018 09:52:21 +0200 Message-ID: <87bm9norm2.fsf@gnu.org> References: <21036238.c6yQEfjfIL@aleksandar-ixtreme-m5740> <3467110.H24gZIzStD@aleksandar-ixtreme-m5740> <87ftz0vidc.fsf@netris.org> <15511073.3h7x93ioX3@aleksandar-ixtreme-m5740> <87lg8s9e9b.fsf@gnu.org> <874lfftwrt.fsf@netris.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1535442803 6836 195.159.176.226 (28 Aug 2018 07:53:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Aug 2018 07:53:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: guile-user@gnu.org To: Mark H Weaver Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Aug 28 09:53:19 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fuYoO-0001aZ-BX for guile-user@m.gmane.org; Tue, 28 Aug 2018 09:53:16 +0200 Original-Received: from localhost ([::1]:36798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuYqU-0001ff-Lq for guile-user@m.gmane.org; Tue, 28 Aug 2018 03:55:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuYq1-0001bu-6B for guile-user@gnu.org; Tue, 28 Aug 2018 03:55:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fuYnY-0003VO-BP for guile-user@gnu.org; Tue, 28 Aug 2018 03:52:27 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuYnY-0003V9-5a; Tue, 28 Aug 2018 03:52:24 -0400 Original-Received: from [193.50.110.186] (port=33078 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fuYnX-0002Ku-R8; Tue, 28 Aug 2018 03:52:24 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 Fructidor an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu In-Reply-To: <874lfftwrt.fsf@netris.org> (Mark H. Weaver's message of "Mon, 27 Aug 2018 15:49:42 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14802 Archived-At: Hello, Mark H Weaver skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> I would suggesting returning zero values, using: >> >> (values) >> >> That way, if a caller wrongfully attempts to get at the return value of >> that procedure, it=E2=80=99ll get an error. >> >> Fibers does that in several places, and I think it=E2=80=99s a good conv= ention >> as it conveys exactly what you want. > > You cannot store (values) in a variable or data structure, so it > wouldn't work here. > > The issue under discussion is how to represent MessagePack's "nil", > which is one of the possible values that a MessagePack can have, > alongside booleans, integers, floats, strings, arrays, etc. Oops, sorry for the off-topic reply! In this context, my preference would be for a singleton type: (define-record-type (nothing) nothing?) Ludo=E2=80=99.