From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Panicz Maciej Godek Newsgroups: gmane.lisp.guile.user Subject: Re: A value for "nothing" Date: Mon, 27 Aug 2018 10:29:24 +0200 Message-ID: References: <21036238.c6yQEfjfIL@aleksandar-ixtreme-m5740> <20180827080244.GA10407@tuxteam.de> 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 1535358485 6433 195.159.176.226 (27 Aug 2018 08:28:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 27 Aug 2018 08:28:05 +0000 (UTC) Cc: guile-user@gnu.org To: tomas@tuxteam.de Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Aug 27 10:28:01 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 1fuCsT-0001YT-5j for guile-user@m.gmane.org; Mon, 27 Aug 2018 10:28:01 +0200 Original-Received: from localhost ([::1]:51965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuCuZ-0002H6-CK for guile-user@m.gmane.org; Mon, 27 Aug 2018 04:30:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuCu2-0001ux-Eg for guile-user@gnu.org; Mon, 27 Aug 2018 04:29:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fuCu1-0002qE-GB for guile-user@gnu.org; Mon, 27 Aug 2018 04:29:38 -0400 Original-Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:38995) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fuCu1-0002oi-7G for guile-user@gnu.org; Mon, 27 Aug 2018 04:29:37 -0400 Original-Received: by mail-ed1-x535.google.com with SMTP id h4-v6so9848784edi.6 for ; Mon, 27 Aug 2018 01:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ruBVchW43z0xwnjMDI6nJqseSYA8M7r33acxYgd69Uc=; b=rtrYtJwu+qss0ovAJRlxLFqMUL058+NlW7EQuoS9nWs8r0dcK2l8kHjQZKMPv0ifdF GLYyDGAag8s/qLxJGNR2VYMxKQPPxLv2FS0hQFQ46fltk92+V2mJ8yCNAauefZuT+mfU qBKYeRzdA29u8bky87bQKkvU8ITuXjuYzBI3VOglBJPr/Ybcoks3eodhOvS/ap0KzsNu gCoX/y5LQWgManDMTqCqhDS3WinZYGnnFw/QXTEBjTiZn4kopAUpBBlCjMWPp4ebRkfU KrSFGsKdmt/FYdH9SktVBmCa7K3mPRr1aGZvzHS9HHWGapMaawkLC7EdkX1e/2mZi4PM Gxhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ruBVchW43z0xwnjMDI6nJqseSYA8M7r33acxYgd69Uc=; b=PlCeyNeo8IsqU8c/duSJpRCCEy/rCKie84L59LH2q6nYFg+7Ja2SmN3YAonR5XtzZK imQZxXORa7C7gceqjgVOOi2WwRNK9KXkch2kSxYrmpKKDLS6g2abSWkuHuLjp/RJ/fmz zkuzuQTWCdply30DfALVrgaBCGL+jFi0n8nHExnbyn6ihNrkjXh8wW+UpAOKlfu9EEAG 14nEeCQIqlpF4dzzkt19kDwNvAhbkgxUwGEonI+r9Ev0SYQn2XvdFJpv0yTQxpZvPWrg 7vEFrrq+k8Hy6gNIQwHWdJxOGpG5Qo0A6ZJJTGzT1cGv8sxoFqfX29UmZxjTaqjlo5/I jDgA== X-Gm-Message-State: APzg51D/eCT/u1v7DJ4AY6QPtgV3Q58DG9X+99lybRbZWcHfG5F22Ro3 uLxdjOT+laQqvU9yBSEB+DMdkblxEjFyaYgw7Lc= X-Google-Smtp-Source: ANB0VdZFRLsIk/+drxQZRVU92+Enmtd5BnTmRszAvz19wR0S89J5fr2MERQAUxmCNGGYQigGZJZoyHL4izGRwCW8EtA= X-Received: by 2002:a50:86cf:: with SMTP id 15-v6mr2830086edu.266.1535358576175; Mon, 27 Aug 2018 01:29:36 -0700 (PDT) In-Reply-To: <20180827080244.GA10407@tuxteam.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::535 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:14778 Archived-At: pon., 27 sie 2018 o 10:17 napisa=C5=82(a): > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Mon, Aug 27, 2018 at 02:17:06AM +0200, Panicz Maciej Godek wrote: > > niedz., 26 sie 2018 o 16:09 HiPhish napisa=C5=82(a)= : > > > > > Hello Schemers, > > > > > > I am writing an implementation of MessagePack [1] for Guile and a par= t > of > > > the > > > spec is the presence of a "nil" data type. What would be a good value > to > > > express "nothing" in Guile? I cannot use '() because that would be > > > indistinguishable from the empty list, so I thought that the return > value > > > of a > > > function that returns nothing would be a good fit. The function > `display` > > > for > > > example returns an `#` value, but the only way of > producing > > > it > > > without side effects so for is the value of `(if #f #f)`. Is there a > > > better > > > way? > > > > > > > > In my experience, if #f doesn't make sense as a legal value, then using > #f > > is probably the idiomatic Scheme way to go. > > [...] > > In this case, as msgpack has explicit true and false values, those seem > the "natural" correspondents of Scheme's #t and #f. > If that's the case, then perhaps actually returning no value (as in the (values) form with no arguments) is the way to go?