On Sat, Feb 10, 2024 at 12:24:36PM +0000, Pietro Cerutti wrote:
> This is not how I reason about referential transparency. It is a property of 
> functions applied to values, not variables.
> The fact that you can define x to different values or even rebind it in the 
> scope of a let binding doesn't make (lambda (x) (+ x 1)) less referentially 
> transparent.
> If you change the value of a slot of a vector, then the vector has a 
> different value than before, even if the same name binds to the value.

This might be true in an abstract sense, but it isn't true for the
CHICKEN type system.  The same vector (e.g. eq? returns #t) is always
the same "value", for purposes of the type system.

It can have different values inside its slots, which is why we have
to differentiate between pure and clean functions (see my other mail).

Cheers,
Peter

Attachment: signature.asc
Description: PGP signature

Reply via email to