Am So., 20. Juni 2021 um 00:05 Uhr schrieb Shiro Kawai <xxxxxx@gmail.com>:
On Thu, Jun 17, 2021 at 8:08 PM Marc Nieper-Wißkirchen <xxxxxx@gmail.com> wrote:

Can you give a code example for your last comment about linear updating procedures? In which sense are they different, to, say the use of assignment (via set!) in Scheme code?
 

It isn't different from set!.   Thus, we can't lightly use it, even on temporary objects that won't leak out to the outside at all.
I'm afraid that this would drag the performance of lots of code.

It's true that in a language like Scheme one has to be careful with all mutations, whether 'set!', 'vector-set!', or linear update procedures. Dynamic-wind can be of help here.

But in what sense would the existence of, say, linear update procedures, drag the performance of code? You won't say that 'set!' or 'vector-set!' do this.

With our new proposal for linear update procedures, the user will at least be informed if a mutated object is used twice. These logical errors are much harder to detect with 'set!' and 'vector-set!'.