[squeak-dev] MNU for ifNil: to preserve quick returns? :-)
marcel.taeumel at hpi.de
Tue Jul 21 08:36:05 UTC 2020
I can choose to initialize an instVar eagerly in #initialize or lazily in its accessor via #ifNil:. Yet, the latter requires me to change that accessor to something not being a quick return.
Could there be a simple way to initialize an instVar on its first read access? Like a #notYetInitialized: callback to the instVar-holding receiver. Instead, we get an MNU on UndefiniedObject ...
(Why? Performance reasons for a little project of mine.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev