rmonad icon indicating copy to clipboard operation
rmonad copied to clipboard

Caching in data that have reference semantics

Open arendsee opened this issue 6 years ago • 0 comments

How should rmonad handle mutable data?

For example, if an environment is stored in rmonad, say as the head node in an Rmonad object, and then the environment is altered outside the rmonad pipeline, then the Rmonad object is changed as well. Or worse, data cached somewhere deeper inside an rmonad pipeline could be altered if it is mutable.

I could possibly fix this problem by making deep copies (clones) of mutable objects. However, this is slow and may violate expectations.

Or perhaps I should just leave rmonad as is and post a warning about the use of mutable data in rmonad pipelines?

arendsee avatar May 14 '18 15:05 arendsee