Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Q: Who cuts the grass on Walton's Mountain? A: Lawn Boy.


comp / comp.lang.scheme / Re: Why is it allowed to deduce from undefined?

SubjectAuthor
o Re: Why is it allowed to deduce from undefined?Tristan Wibberley

1
Subject: Re: Why is it allowed to deduce from undefined?
From: Tristan Wibberley
Newsgroups: comp.lang.scheme
Organization: A noiseless patient Spider
Date: Sat, 2 Mar 2024 12:52 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tristan.wibberley+netnews2@alumni.manchester.ac.uk (Tristan Wibberley)
Newsgroups: comp.lang.scheme
Subject: Re: Why is it allowed to deduce from undefined?
Date: Sat, 2 Mar 2024 12:52:27 +0000
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <urv7ed$1sl8m$1@dont-email.me>
References: <33039de8-5db0-4c06-b764-39a7a7e475a2n@googlegroups.com>
<1ecee9d2-0928-480e-88e1-c99300e89ad2n@googlegroups.com>
<7d8de17d-7b98-4793-81f0-bbd0b63486c5n@googlegroups.com>
<7a54f16a-9839-4530-9242-1ed9f6632d01n@googlegroups.com>
<05df6561-f04b-4845-b472-8adb4a7e4694n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 2 Mar 2024 12:52:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f35d0a1a33e0186eb06251e729bef78d";
logging-data="1987862"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nHpT05Ewz2pdJmj7egtAE5n5xQVB308rKhaO9H8DzUQ=="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:71xMU/44aUQdRnwPaWeK866jA3M=
Content-Language: en-GB
In-Reply-To: <05df6561-f04b-4845-b472-8adb4a7e4694n@googlegroups.com>
View all headers

On 10/11/2023 11:33, ceving wrote:
> Maciek Godek schrieb am Freitag, 10. November 2023 um 12:07:22 UTC+1:
>>
>> R5RS says this: |If the value of an expression is said to be ``unspecified,'' then the expression must evaluate to some object without signalling an error,
>
> I am wondering why it has been defined this way.
>
> I would say the opposite should be right: it must signal an error.

First, I'm a newbie with Scheme, so I don't know all the names and nuances.

You're thinking of pure functional languages. In Scheme, which has a
certain imperative essence, (if...) can give *unspecified* and you can
signal an error in that condition. It's like 'Control.Monad.when' in
Haskell or 'if' in C, except that it also allows you to use it like 'if'
in Haskell if you want to.

That makes (if...) useful for inserting conditional actions in a
sequence of them.

You can always give a second argument if you are slow and steady enough.

You can write a strict (if...) that requires two arguments but you must
use a macro, I think, rather than (define...). I think you can force all
(if...) uses in your files to be so strict if you want to make sure
you've done that everywhere but I'm not so sure scheme makes it hard to
subsequently liberalise.

1

rocksolid light 0.9.8
clearnet tor