GNU bug report logs -
#30145
[PATCH] doc: Document undefined?.
Previous Next
Reported by: Arun Isaac <arunisaac <at> systemreboot.net>
Date: Wed, 17 Jan 2018 17:53:02 UTC
Severity: normal
Tags: patch
Done: Arun Isaac <arunisaac <at> systemreboot.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sun, 21 Jan 2018 23:52:08 +0530
with message-id <cu7po63ysvj.fsf <at> systemreboot.net>
and subject line Re: bug#30145: [PATCH] doc: Document unspecified?.
has caused the debbugs.gnu.org bug report #30145,
regarding [PATCH] doc: Document undefined?.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
30145: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30145
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* doc/ref/data-rep.texi: Document undefined?.
---
doc/ref/data-rep.texi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/ref/data-rep.texi b/doc/ref/data-rep.texi
index bb7f74afe..ed3a5a522 100644
--- a/doc/ref/data-rep.texi
+++ b/doc/ref/data-rep.texi
@@ -470,6 +470,9 @@ check to see if @var{x} is @code{SCM_UNBOUND}. History will not be kind
to us.
@end deftypefn
+@deffn {Scheme Procedure} undefined? x
+Return @code{#t} if @var{x} is undefined, else @code{#f}.
+@end deffn
@node Non-immediate objects
@subsubsection Non-immediate objects
--
2.15.1
[Message part 3 (message/rfc822, inline)]
Mark H Weaver <mhw <at> netris.org> 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.
This bug report was last modified 7 years and 159 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.