This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
immutability: readonly ref to writable value vs ref to readonly value #321
Labels
enhancement
New feature or request
i will use
so it's easier to read
examples
now we need to describe how Object.freeze can magically receive ref to writable value and return ref to readonly value so that user defined functions can have similar functionality
and how this is correct code
lets go over this code again
more examples
lets go over it again
one more question
Q: can i get readonly ref to writable value without having ownership or cloning like
Object.freeze
does?A: if we introduce some understanding of ownership it is possible
let's say all types are borrowed (not owned) by default
in this new example you can't edit
FEATURES03_1
but we know that it's value can be edited after any non-pure function call is made so refinements on it does not stick around like it does forFEATURES01
andFEATURES04
after writing this i think we need ownership and borrowing at some point ...
The text was updated successfully, but these errors were encountered: