[Self-interest] Hiding object internals
Randy Smith
randy.smith at gmail.com
Mon Jul 5 21:47:22 UTC 2021
Jiri, not sure exactly what you want, but how about
(|
parent1* = (| a = 11. b=22 |).
parent2* = (| a = 22. secretInnerSelf = (| b=33 |) |).
a = 1
|)
The above would fit your stated requirement of having parent2 hold some secret inner structure. Does this solve your “mismatching” problem?
--Randy
From: Self-interest <self-interest-bounces at lists.selflanguage.org> on behalf of "Jiri R." <jiriq at icloud.com>
Date: Monday, July 5, 2021 at 1:14 PM
To: "self-interest at lists.selflanguage.org" <self-interest at lists.selflanguage.org>
Subject: [Self-interest] Hiding object internals
Hello!
Assume an object:
(|
parent1* = (| a = 11. b=22 |).
parent2* = (| a = 22. b=33 |).
a = 1
|)
Sending 'a', gives '1' as expected:-)
Sending 'b' gives an error: "More then one 'b' slot was found .."
What if I need the parents to hide some of their inner structure to not mismatch with other objects? Click-on-a-slot / Make-private seems to be only cosmetic/annotation thing.
Regards,
Jiri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20210705/cb70bac3/attachment.html>
More information about the Self-interest
mailing list