[Newbies] AbstractObjectsAsMethod

David T. Lewis lewis at mail.msen.com
Sat Mar 13 14:47:46 UTC 2021


Actually I think that David is right, a page on the wiki would be quite
helpful here. I do not understand the topic well enough to write that
page, but it would be great if someone can explain it.

In this case the wiki page might explain something about the background
of ObjectsAsMethods. Why was it invented, and for what might it potentially
be useful? Sometimes features like this are invented because they are
interesting and "just because we can". In other cases, there is some
bigger idea involved. I don't know which it is here, the feature is
interesting but I can't think of any useful application for it.

I also note that class TestObjectsAsMethods and its two support classes
AbstractObjectsAsMethod and ObjectsAsMethodsExample do not even have
any class comments. Nor do any of the tests have method comments. Yes,
it is possible to figure out how it works by experimenting with the
tests, but this certainly does not qualify as good in-image documentation.
Some class comments would be welcome here :-)

Dave


On Thu, Mar 11, 2021 at 11:48:01AM +0000, Thiede, Christoph wrote:
> Hi David,
> 
> 
> I think this is already documented quite well in TestObjectsAsMethods, directly in your image. IMO this kind of documentation is also more sustainable than documentation in a far-away wiki that can deprecate and be out of sync with the rest of the code. :-)
> 
> 
> Best,
> 
> Christoph
> 
> <http://www.hpi.de/>
> ________________________________
> Von: Beginners <beginners-bounces at lists.squeakfoundation.org> im Auftrag von stes at PANDORA.BE <stes at telenet.be>
> Gesendet: Donnerstag, 11. M?rz 2021 12:32:29
> An: beginners
> Betreff: Re: [Newbies] AbstractObjectsAsMethod
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> 
> When doing a search on wiki.squeak.org: search for AbstractObjectsAsMethod
> 
> it finds matches in
> 
> ListOfClassesInSqueak5dot0
> ListOfClassesInSqueak5dot1
> ListOfClassesInSqueak5dot2
> ListOfClassesInSqueak5dot3
> 
> So AbstractObjectsAsMethod  is in there, but there is no info,
> that the purpose is (I think) that subclasses provide their own version of
> 
>    run:aSelector with:arguments in:aReceiver
> 
> where the run:with:in: message is dispatched by the VM.
> 
> In the example with the class Bar where I add #foobar
> using addSelector:withMethod:
> 
> aSelector is #foobar
> arguments is an Array
> aReceiver is then an instance of Bar
> 
> David Stes
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
> 
> iQEcBAEBCAAGBQJgSf+RAAoJEAwpOKXMq1MalZUH/jaympPLw9I5nj9XWcktII+x
> 8L42KDIUTYROfo7+SbJ14/lx4POujxSPG7F8LYBkzNoVS+7fzA8WVZK+h1yYx6du
> BdpINh5XuMtgMft/u9b/0dS56xbnk0+oKkCKLV7G6iujMl8qfPjGXy6b2MWedDuF
> OOBPeIakns2JCmwOMRwWnREZt1H3xOa8WEPBW4cQZ7aSje5H9gHCBEabtkd12x1T
> WJU4+JsuNTk9bUlo8w1NchfbEdAR1vrzoHlTwxlJYTn5Vt3wsKUyox9Vxfut0skf
> uMpg2jhVYGSkqve39jclvhqB/Pjw0UgLeLAWCBErYK814wBYB5+8Boqx7Mq+6KI=
> =8OYx
> -----END PGP SIGNATURE-----
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners



More information about the Beginners mailing list