guile-user
[Top][All Lists]
Advanced

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

Re: Guile 2.0.9, reader: Cannot 'read' an '*unspecified*' value


From: Taylan Ulrich Bayırlı/Kammer
Subject: Re: Guile 2.0.9, reader: Cannot 'read' an '*unspecified*' value
Date: Tue, 03 Nov 2015 15:44:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Artyom Poptsov <address@hidden> writes:

> Hello Guilers,
>
> it seems that currently there's no way to 'read' back an '*unspecified*'
> value, but in some cases such a feature might be handy.  Here's the
> description of the problem; a patch is attached as well.

Just my opinion: I generally see code relying on the existence of the
*unspecified* value (let alone any specific semantics of it) to be
sub-optimal.

Guile documents the value, so I guess there's some guarantees regarding
its existence and semantics, but I think it's best not to rely on it
anyway, so that #1 Guile can decide to do something else in the future
where it currently returns *unspecified*, #2 code has clearer semantics,
#3 code can be ported more easily to other Scheme platforms (say GNU
Kawa), and possibly more such benefits.

In that vein, I actually find it beneficial when code relying on the
*unspecified* value fails as early as possible.  For instance in Guix
package recipes, some people (including me) occasionally accidentally
write recipes where a procedure returns *unspecified* where actually a
Boolean is expected.  This easily falls through the cracks because the
system accepts *unspecified* as a non-false Boolean value, when actually
it indicates that any arbitrary value could have been returned in its
place, including #f.

Just my two cents.  The maintainers should decide what to do. :-)

Taylan



reply via email to

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