[squeak-dev] Inspector / Explorer display (printOn:) closures slightly differently

Jaromir Matas m at jaromir.net
Sun Feb 21 13:20:12 UTC 2021


I suspect "[closure] in Class>>method" really means:

     closure: [] in Class>>method

while "[] in Class>>method" actually points to a context:

     context: [] in Class>>method

I understand a "closure" is, in fact, a block in a context. For a beginner
"[closure]" is really cryptic and confusing... 

In addition, seeing "sender  =  
FullBlockClosure(BlockClosure)>>valueWithExit:" really twisted my brain :)
The sender is, indeed, a context.


May I suggest something more consistent to provide a clear clue e.g.:

sender... context [] in Class>>method

receiver... closure [] in Class>>method

analogous, though redundant:
outerContext... context [] in Class>>method
closureOrNil ... closure [] in Class>>method

Thanks a lot. Regards,



-----
^[^ Jaromir
--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html


More information about the Squeak-dev mailing list