Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Be different: conform.


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:17 UTC
References: 1
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:17:02 +0000
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <urv5bv$1s7n9$1@dont-email.me>
References: <33039de8-5db0-4c06-b764-39a7a7e475a2n@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:17:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f35d0a1a33e0186eb06251e729bef78d";
logging-data="1973993"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+gG5aKpCE08Qv7KyDt8glFvZRYiyT/kaNR0Y4lLPWJQw=="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:vOHACOLXAP6zM4kxqmGU1hHdBd8=
In-Reply-To: <33039de8-5db0-4c06-b764-39a7a7e475a2n@googlegroups.com>
Content-Language: en-GB
View all headers

On 10/11/2023 08:21, ceving wrote:
> The following looks like a contradiction to me:
>
> (if (if #f #f) #t #f) ;; => #t
> (equal? (if #f #f) #t) ;; => #f
>
> Why does Scheme allowed this? And why is it anything other than division by zero?

In Guile:
*There seems to be a common object available with the name
"*unspecified*" which 'if' uses for an unspecified branch.

* It's 'equal?' to itself as well as 'eq?' and 'eqv?' - I didn't try
others.

* It's distinct from both end-of-list and #f.

I would expect division by zero only should 'if' be defined at least in
part by division.

--
Tristan

1

rocksolid light 0.9.8
clearnet tor