Replies: 1 comment
-
There's a My usual advice here, assuming the object plays the role of a prototype, is to extend the object instead and then define any predicates that make changes to the object internal dynamic state (which is implicit in this case, otherwise there would be no need for cloning) so that the changes are local to the object receiving the message. Therefore, when the descendant object changes its internal dynamic state, that change will not affect the parent object. A relevant example is: When using objects playing the roles of classes and instances, two relevant examples are: https://github.com/LogtalkDotOrg/logtalk3/tree/master/examples/classvars You can of course also define an implementation for the |
Beta Was this translation helpful? Give feedback.
-
How to clone a prototype or an instance in Logtalk ?
Does it exist support for this operation ?
Beta Was this translation helpful? Give feedback.
All reactions