[Top][All Lists]

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

bug#30145: [PATCH] doc: Document unspecified?.

From: Arun Isaac
Subject: bug#30145: [PATCH] doc: Document unspecified?.
Date: Sun, 21 Jan 2018 23:52:08 +0530

Mark H Weaver <address@hidden> writes:

About undefined?: That was a typo. I mentioned that in a later message.

> It's nonsensical to ask whether a given object is "unspecified".  When
> the Scheme standards say that the result of a computation is an
> unspecified value, that means that *any* Scheme object could be
> returned.
> In Guile, for historical reasons, we usually return a particular object
> SCM_UNSPECIFIED (a.k.a. *unspecified*) in cases where the specification
> says that the result is unspecified.  However, we make no promises that
> this will remain the case in future versions of Guile.
> The number of legitimate uses for 'unspecified?' is extremely small.  In
> fact, I can think of only one: when a REPL prints the result of a user's
> computation, it is nice to avoid printing "*unspecified*" and instead
> print nothing in that case.
> In almost every other case, use of 'unspecified?' implies an assumption
> that it's possible to detect when a value is an "unspecified" value,
> when in fact that is fundamentally impossible.
> What do you think?

I agree. I didn't put very much thought into the matter before I sent
the patch. I needed unspecified? for a patch to GNU Guix. I found the
info documentation missing for unspecified? and thought I'll write
it. Later, it turned out unspecified? was not necessary for the Guix
patch after all. But, I had already documented unspecified?. So, I sent
it here.

Anyways, I'll close this bug report.

reply via email to

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