IRC channel logs

2023-02-13.log

back to list of logs

<flatwhatson><vv[m]> Hmm, the question I have, is how does one bcom an object that is expected to be selfish? :o
<flatwhatson>I think "self" remains the same through calls to bcom. It's the same object transitioning to a new state.
<flatwhatson>In fact the selfish-spawn pattern shows this. First, it's spawned with (selfish-constructor bcom self) then calls (bcom (apply constructor bcom self args)).
<vv[m]>aha. makes sense. but still. if it's not selfish to start with, can you transition into it with bcom? only out? or both?
<flatwhatson>you can bcom something that doesn't take self, but that something couldn't later bcom something which does take self
<flatwhatson>unless some mechanism exists or is introduced which can look up "self" without it needing to be passed around
<flatwhatson>i guess you could implement that by wrapping constructors in a way that they keep self, and wrap bcom so that it re-injects self, and use a parameter (ie. dynamically-scoped variable) to store self
<flatwhatson>something like that would allow you to write actors which can just call (get-self) if/when they need it, and not bother passing it around
<vv[m]>true