From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: HiPhish Newsgroups: gmane.lisp.guile.user Subject: Re: A value for "nothing" Date: Mon, 27 Aug 2018 10:29:14 +0200 Message-ID: <15054929.sbgKR7obcS@aleksandar-ixtreme-m5740> References: <21036238.c6yQEfjfIL@aleksandar-ixtreme-m5740> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit X-Trace: blaine.gmane.org 1535358459 4372 195.159.176.226 (27 Aug 2018 08:27:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 27 Aug 2018 08:27:39 +0000 (UTC) Cc: guile-user@gnu.org To: Panicz Maciej Godek Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Aug 27 10:27:35 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 1fuCs3-00012K-4Y for guile-user@m.gmane.org; Mon, 27 Aug 2018 10:27:35 +0200 Original-Received: from localhost ([::1]:51964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuCu9-0001nd-86 for guile-user@m.gmane.org; Mon, 27 Aug 2018 04:29:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuCtm-0001nV-Mm for guile-user@gnu.org; Mon, 27 Aug 2018 04:29:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fuCtj-0002YM-BN for guile-user@gnu.org; Mon, 27 Aug 2018 04:29:22 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:53681) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fuCtj-0002Xh-3H for guile-user@gnu.org; Mon, 27 Aug 2018 04:29:19 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 91C8920A46 for ; Mon, 27 Aug 2018 10:29:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1535358556; bh=A3/rZ8/VQlYAU3yiBrQasZptsglCY8Uy4h6HbKyU7uA=; h=From:To:Cc:Subject:Date:From; b=A8mjUUBj0kJ4xRc1vDea0GyVVYnjyiYg1qzMnAvudZ6ffhVnyveF2ZNRQTnynKDHb i+3wW0KDaQy0XQbzKIMH016tXXdWTGXeaI8Yl643/6U10M2rZDMdS990S1+P09B3pI UylWfkSLUyEJZ0IgArl5hFTOmNHLUyDO5ZjlqGDS/jzAZqyc0GVT72Iv0W4WTZ/XR9 BTtRq2HmopZ+4Rnl09ZGKST55TElHt1JdVbKJPZtud+qfBwMdU3wkIxHuvMz3K8HJz ULXBQRXW2k6SpEk9Zr9VRPDjpQT/+GUmuhjvVzJhQ9o+Yu83RJ4s7kQ28XDkTB4/k7 NTcI/1Rc2q+bw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 41zQ623wrcz9rxW; Mon, 27 Aug 2018 10:29:14 +0200 (CEST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.67.36.66 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:14777 Archived-At: On Montag, 27. August 2018 02:17:06 CEST you wrote: > In my experience, if #f doesn't make sense as a legal value, then using #f > is probably the idiomatic Scheme way to go. > It composes with SRFI-2's and-let* in a way similar to Haskell's Nothing > within the "do" notation. > I did find it useful when I was implementing a pattern matching facility, > where I could distinguish between an empty list of (successful) bindings > and a failed match. > But I think you would need to tell us more about the library: where do the > values come from and what do they represent. What would this "nil" data > type be supposed to stand for? I literally don't know where the values will come from, that's the thing. MessagePack is a data serialization format: a process has some in-memory object, turns it into bytes and later reads those bytes to generate an in- memory object. The bytes could come from an entirely different process in a language which distinguishes between "nothing", "falsely" and "empty list". If you use MessagePack for a remote procedure call and on the other end you *must* be able to distinguish between those things, then you also *must* be able to distinguish them on Guile's end as well.