You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently entities employ reference semantics rather than value semantics, which is the less intuitive of the two. This means that passing in a const entity to a function does not guarantee that the entity won't be modified (since you can just copy it into a non const entity and modify it there).
There are other problems like sync() not being able to be called from a const entity and other little things that just feel off.
The options going forward are either to keep things as is or to split entity into two classes, a const entity and a non-const one, where the manager will return one or the other based on context. Probably the best approach to this but might feel unintuitive and hard to follow.
The text was updated successfully, but these errors were encountered:
Currently entities employ reference semantics rather than value semantics, which is the less intuitive of the two. This means that passing in a
const entity
to a function does not guarantee that the entity won't be modified (since you can just copy it into a non const entity and modify it there).There are other problems like
sync()
not being able to be called from a const entity and other little things that just feel off.The options going forward are either to keep things as is or to split entity into two classes, a const entity and a non-const one, where the manager will return one or the other based on context. Probably the best approach to this but might feel unintuitive and hard to follow.
The text was updated successfully, but these errors were encountered: