On Tue, 2007-02-13 at 22:24 +0100, Lukas Renggli wrote:
So I decided
to change Magritte not to do infinite recursion. I
changed
MADescriptionBuilder>>for: anObject
^ cache at: anObject ifAbsent: [
cache at: anObject put: true.
cache at: anObject put: (self build: anObject).
].
Looks like an interesting trick, but don't you then end up with the
value true in some of your meta-models? Wouldn't it make more sense
to use nil instead?
Hmmm, I don't know if I got your point. The value at: anObject
gets discarded after self build returns (If I understand
IdentityDictionary the right way). So there is no difference
between true and nil. I just didn't spend a second thinking about
what to put as a placeholder. Now I can see the problem if there
is a second invocation with the same object before the placeholder
gets exchanged. Do you mean this?
Norbert