unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: John Cowan <cowan@ccil.org>
Cc: guile-user@gnu.org, Matt Wette <matt.wette@gmail.com>
Subject: Re: A value for "nothing"
Date: Tue, 28 Aug 2018 11:38:41 -0400	[thread overview]
Message-ID: <87h8jeijr2.fsf@netris.org> (raw)
In-Reply-To: <CAD2gp_Q_Fud4avS_SVEJARkq4-a7URCdAsnuVsfgNymS0L+5-A@mail.gmail.com> (John Cowan's message of "Tue, 28 Aug 2018 11:19:06 -0400")

John Cowan <cowan@ccil.org> writes:

> On Tue, Aug 28, 2018 at 3:01 AM Mark H Weaver <mhw@netris.org> wrote:
>  
>  In RnRS, (define a (if #f #f)) is allowed and guaranteed to assign
>  *some* object to 'a' without signalling an error.  
>
> Actually, the phrase used is "the result is unspecified", which unfortunately
> is not defined in any RnRS.

That's the phrase used in R7RS-small, which fails to define it, as you
noted, but that shortcoming is limited to R7RS.

In R6RS, section 11.4.3 (Conditionals) provides this example:

  (if #f #f) ===> unspecified

whose meaning is defined in section 6.6 (Evaluation examples), which
states:

  Moreover, the "===>" symbol is also used to explicitly say that the
  value of an expression is unspecified.  For example:

    (eqv? "" "") ===> unspecified

I take the use of the singular form of "value" here to imply that it
returns only one value.

R5RS is even more clear.  It states "If <test> yields a false value and
no <alternate> is specified, then the result of the expression is
unspecified."

Section 1.3.2 of R5RS makes it crystal clear what that means:

  If the value of an expression is said to be "unspecified," then the
  expression must evaluate to some object without signalling an error,
  but the value depends on the implementation; this report explicitly
  does not say what value should be returned.

> Racket produces a syntax error in this situation at least in its
> default language.

Racket has diverged from Scheme quite a bit, to the point that they
don't even call the language "Scheme" anymore, but rather "Racket".

       Mark



  reply	other threads:[~2018-08-28 15:38 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-26 10:13 A value for "nothing" HiPhish
2018-08-26 17:21 ` Thomas Morley
2018-08-26 17:27 ` Joshua Branson
2018-08-26 17:49 ` John Cowan
2018-08-27  4:52   ` Mark H Weaver
2018-08-27 13:00     ` John Cowan
2018-08-27 21:29       ` Mark H Weaver
2018-08-27 21:32       ` Mark H Weaver
2018-08-26 20:07 ` Mark H Weaver
2018-08-26 22:08   ` Matt Wette
2018-08-27  8:04   ` tomas
2018-08-27 20:12     ` Mark H Weaver
2018-08-27 20:46       ` Mark H Weaver
2018-08-28  0:50         ` Matt Wette
2018-08-28  6:58           ` Mark H Weaver
2018-08-28 15:19             ` John Cowan
2018-08-28 15:38               ` Mark H Weaver [this message]
2018-08-28 15:59                 ` Mark H Weaver
2018-08-28 16:12                 ` John Cowan
2018-08-28 17:15                   ` Mark H Weaver
2018-08-28 19:07                   ` Mark H Weaver
2018-08-27 20:54       ` Hans Åberg
2018-08-27  0:17 ` Panicz Maciej Godek
2018-08-27  8:02   ` tomas
2018-08-27  8:29     ` Panicz Maciej Godek
2018-08-27  8:29   ` HiPhish
     [not found] ` <8840615.kRvQfVdCvZ@aleksandar-ixtreme-m5740>
     [not found]   ` <CAD2gp_QLqd=_RbF=HTEbCLp1onmUq-c74g0FXTvMgdz8JB4-8A@mail.gmail.com>
2018-08-27  8:24     ` HiPhish
     [not found] ` <3467110.H24gZIzStD@aleksandar-ixtreme-m5740>
     [not found]   ` <87ftz0vidc.fsf@netris.org>
2018-08-27  8:40     ` HiPhish
2018-08-27 12:37       ` Ludovic Courtès
2018-08-27 19:49         ` Mark H Weaver
2018-08-28  7:52           ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2018-08-26 20:25 HiPhish
2018-09-13 21:49 HiPhish
     [not found] ` <CAD2gp_Sg-aDXZKfOcL-i2py7ne4c0Cp+2HvKS4DYi1Antm_B1A@mail.gmail.com>
2018-09-14 22:45   ` HiPhish
2018-09-15  0:26     ` John Cowan
2018-09-15 14:50       ` HiPhish
2018-09-15 18:28         ` Keith Wright
2018-09-15 21:50           ` Edwin Watkeys
2018-09-15 22:16             ` HiPhish
2018-09-15 22:23               ` Edwin Watkeys
2018-09-15 22:13           ` HiPhish
2018-09-15 22:45       ` David Pirotte

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=87h8jeijr2.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=cowan@ccil.org \
    --cc=guile-user@gnu.org \
    --cc=matt.wette@gmail.com \
    /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).