`opaque` and non-copyable classes
Closed this issue · 1 comments
lhmouse commented
One of the core principles of Asteria is that values may be copied and destroyed with no side effects. The current implementation relies heavily on copy-on-write. For extensibility and interoperability, we added the opaque
type, but:
- If an
opaque
object is copied via COW, will the user observe the difference? - If a COW'd object is modified, will other references to the same object observe the modification (note functions are immutable)?
- If the user really wishes to perform a deep copy, when should the object be copied?