[squeak-dev] MethodFinder.Blocks
Thiede, Christoph
Christoph.Thiede at student.hpi.uni-potsdam.de
Sun Oct 13 23:27:03 UTC 2019
Hi all,
I just got irritated as I evaluated
MethodFinder methodFor: {{#(1 2). #even}. #(1)}
and got no hit.
This is because the MethodFinder stores an extra list of selector parameters that are assumed to require a block argument (Blocks) -- but nowadays this requirement is not given, as you can pass a Symbol, MessageSend, SortFunction or whatsoever, thanks to polymorphy. So (how) is this block check still relevant? If I remove it, I get the right hit and can do thinks like
MethodFinder methodFor: {{#(1 2). #yourself descending}. #(2 1)}.
Also, #ifError: will prevent any error thrown if the block does not match the selector.
Looking forward to your answers :)
Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191013/e42665c0/attachment.html>
More information about the Squeak-dev
mailing list
|