

72·
10 days agoWhat you need here is not the stability in memory (i.e. of pointers, which you lose when you recreate an object) but instead just the stability of an identifier (e.g. the index into a list).
What you need here is not the stability in memory (i.e. of pointers, which you lose when you recreate an object) but instead just the stability of an identifier (e.g. the index into a list).
FYI there is an open source reimplementation of Flash from scratch called Ruffle that should solve all the security issues that Flash had. It runs on WASM so it’s compatible with modern browsers. The New York Times is using it to bring back some old interactive/animated pages that relied on Flash.
50 years ago people thought everyone would be able to program using BASIC, now you think everyone will be able to program using AI. It seems nothing has changed in 50 years.
That’s the point, when programming with immutable structures you always pass the mutability onto the enclosing structure.
A list is an antipattern here IMO. Just wrap it in some dedicated object (see e.g. Java’s
StringBuilder
).