On Tue, 2007-02-13 at 22:42 +0100, Adrian Kuhn wrote:
Better put a placeholder in the cache and then do a
oneWayBecome
afterwards.
cache at: key ifAbsent: [
cache at: key put: (placeholder := Object new).
cache at: key put: (newValue := (self build: anObject)).
placeholder oneWayBecome: newValue ].
And if you want it bullet proof, you use Meta's MessageRecorder :)
Hmmm, I don't have a oneWayBecome: in my image. But I like the
idea if I understand you correct. But wouldn't
cache at: key ifAbsent: [
cache at: key put: (placeholder := Object new).
placeholder oneWayBecome: self build: anObject ].
perfectly sufficient? (Ok, if I had a oneWayBecome ;) ). Is this
something totally different to protoobjects become: ???
very curious,
Norbert