guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A value for "nothing"


From: Mark H Weaver
Subject: Re: A value for "nothing"
Date: Mon, 27 Aug 2018 15:49:42 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

address@hidden (Ludovic Courtès) 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’ll get an error.
>
> Fibers does that in several places, and I think it’s a good convention
> 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.

MessagePack is similar to JSON, so the question we're discussing is
analogous to the question of how to represent JSON's "null" in Scheme.

      Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]