On 2024-02-10 10:13, Pietro Cerutti wrote:

I don't get your question: those two things are the same thing :)

Referential transparency means you can substitute an expression with its expansion down to a value. If anything happening in between causes (observable *) changes, you can't do it anymore.

(*) modifying the program counter is not an observable change, for example.

Those two things are the same thing in Haskell and languages that have a mathematical model of the program, yes. Scheme is... not that, much of the time. Chicken is implemented on top of C, so it's even less clear.


But let's not get theoretical, yes, my question is if csc can (does?) "memoize" the results of "pure" function.


In any case, the definitions I quoted above

* https://wiki.call-cc.org/man/5/Declarations#pure

* https://wiki.call-cc.org/man/5/Types#purity

are not the same thing, so either the one or the other should stand. Though I'm not sure what "local variables or data contained in local variables" actually means. I think it means you can't "set!" globals.


-- Al


Reply via email to