[squeak-dev] proposal: MessageSend understands #homeMethod

Marcel Taeumel marcel.taeumel at hpi.de
Tue May 3 13:12:24 UTC 2022


Hi Lauren --

-1

#homeMethod is an implementation detail of CompiledCode.

However, we could think about having a #compiledCode accessor/query on MessageSend, Symbol, BlockClosure, Context, CompiledCode, CompiledMethod, CompiledBlock, ... maybe even MethodReference? Is this even a coherent group of concepts here?

The thing is, that #homeMethod would not be a "property" but a dynamic query. It can change for some of the receivers over time. Could be tricky to maintain...

Note that the class Message is only a helper to have something for #doesNotUnderstand:. It is thus not part of the group. Or is it?

In this scenario here, MessageSend and BlockClosure are very close friends. While MessageSend has typically less overhead by default, BlockClosure has a more compact literal syntax. If you want to set up a table of callbacks, MessageSend might yield more readable code. BlockClosure s can carry so many statements just mingled together.

:-)

Best,
Marcel
Am 29.04.2022 07:56:10 schrieb Lauren Pullen <drurowin at gmail.com>:
Hi List,

I think it makes sense that MessageSend understands #homeMethod (used in
the debug halo 'browse action code' command).

What I'm not sure about is what sorts of things might occur as a
MessageSend. Obviously, SimpleServiceEntry uses it for buttons, but I'm
not sure how to best handle the dispatch in Smalltalk. Obviously, this
included patch only works for services, so it seems of limited use. How
would the list handle this?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220503/77a6e7a2/attachment.html>


More information about the Squeak-dev mailing list