[squeak-dev] MNU for ifNil: to preserve quick returns? :-)

Marcel Taeumel marcel.taeumel at hpi.de
Tue Jul 21 08:36:05 UTC 2020

Hi all!

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...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200721/a967c792/attachment.html>

More information about the Squeak-dev mailing list