|
Re: 251 vs. 245
Sergei Egorov
(01 Dec 2023 23:43 UTC)
|
|
Re: 251 vs. 245
Per Bothner
(02 Dec 2023 01:54 UTC)
|
|
Re: Re: 251 vs. 245 Sergei Egorov (02 Dec 2023 02:23 UTC)
|
|
Re: Re: 251 vs. 245
Sergei Egorov
(02 Dec 2023 02:28 UTC)
|
|
Re: 251 vs. 245
Per Bothner
(02 Dec 2023 06:11 UTC)
|
|
Re: Re: 251 vs. 245
Sergei Egorov
(02 Dec 2023 07:12 UTC)
|
|
Re: 251 vs. 245
Daphne Preston-Kendal
(02 Dec 2023 09:54 UTC)
|
|
Re: 251 vs. 245
Vladimir Nikishkin
(02 Dec 2023 12:30 UTC)
|
|
Re: 251 vs. 245
Marc Nieper-Wißkirchen
(02 Dec 2023 12:33 UTC)
|
|
Re : Re: 251 vs. 245
Amirouche
(04 Dec 2023 08:36 UTC)
|
|
Re: Re : Re: 251 vs. 245
Marc Nieper-Wißkirchen
(04 Dec 2023 08:42 UTC)
|
|
Re : Re: Re : Re: 251 vs. 245
Amirouche
(04 Dec 2023 09:27 UTC)
|
|
Re: 251 vs. 245
Daphne Preston-Kendal
(04 Dec 2023 09:57 UTC)
|
|
Re: Re : Re: 251 vs. 245
Vladimir Nikishkin
(04 Dec 2023 09:50 UTC)
|
|
Re: 251 vs. 245
Daphne Preston-Kendal
(04 Dec 2023 10:24 UTC)
|
|
Re: 251 vs. 245
Marc Nieper-Wißkirchen
(04 Dec 2023 10:48 UTC)
|
|
Re: 251 vs. 245
Daphne Preston-Kendal
(04 Dec 2023 11:03 UTC)
|
|
Re: 251 vs. 245
Lassi Kortela
(04 Dec 2023 11:24 UTC)
|
|
Re: 251 vs. 245
Sergei Egorov
(04 Dec 2023 11:33 UTC)
|
|
Re: 251 vs. 245
Marc Nieper-Wißkirchen
(04 Dec 2023 12:07 UTC)
|
|
Re: 251 vs. 245
Sergei Egorov
(04 Dec 2023 12:44 UTC)
|
|
Re: 251 vs. 245
Marc Nieper-Wißkirchen
(04 Dec 2023 12:52 UTC)
|
|
Re: Re : Re: 251 vs. 245
Amirouche
(04 Dec 2023 21:59 UTC)
|
(let ((x 10))
(display "the result is: ")
(display x)
(define x 42))
(newline))
; SRFI 245: the result is 10
; SRFI 251: <it is an error>
According to this proposal, the result got to be 10 --
the equivalent R7RS body is nested as follows:
(let ((x 10))
(display "the result is: ")
(display x)
(let ()
(define x 42)
(newline)))
SRFI-245, as I understand it, proposes different "translation":
(let ((x 10))
(define x
(begin
(display "the result is: ")
(display x)
42))
(newline))
... which "is an error" according to R7RS, giving an implementation
a lot of options on how to react (strictly speaking, printing 10 is
one of the options)
On Friday, December 1, 2023 8:54:24 PM (-05:00), Per Bothner wrote:
> Also consider:
>
> (let ((x 10))
> (display "the result is: ")
> (display x)
> (define x 42))
> (newline))
>
> I believe the result here should be undefined - but *not* 10.
>
> In Kawa (which implements 245 and does some flow analysis) you get:
> the result is: 42
> Howver, if you replaced '42' by the non-constant '(list 42)' you get:
> the result is: #!undefined
> In both cases you get a compile-time warning:
> x.scm:3:12: warning - variable 'x' may be uninitialized here