unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: Mark H Weaver <mhw@netris.org>
Cc: 30145-done@debbugs.gnu.org
Subject: bug#30145: [PATCH] doc: Document unspecified?.
Date: Sun, 21 Jan 2018 23:52:08 +0530	[thread overview]
Message-ID: <cu7po63ysvj.fsf@systemreboot.net> (raw)
In-Reply-To: <87wp0bmfmx.fsf@netris.org>

Mark H Weaver <mhw@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.





  reply	other threads:[~2018-01-21 18:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 17:52 bug#30145: [PATCH] doc: Document undefined? Arun Isaac
     [not found] ` <handler.30145.B.15162115551614.ack@debbugs.gnu.org>
2018-01-18  6:16   ` bug#30145: Acknowledgement ([PATCH] doc: Document undefined?.) Arun Isaac
2018-01-18  6:20 ` bug#30145: [PATCH] doc: Document unspecified? Arun Isaac
2018-01-21 14:48   ` Mark H Weaver
2018-01-21 18:22     ` Arun Isaac [this message]
2018-01-21 14:33 ` bug#30145: [PATCH] doc: Document undefined? Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cu7po63ysvj.fsf@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=30145-done@debbugs.gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).