<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p>Hi Marcel,</p>
<p><br>
</p>
<p>as I see it, this Blocks check only restricts the possible hits, so removing it should not damage any existing functionality. (I am *not* talking about modifying <span>Dangerous!)</span></p>
<p>And if you do</p>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p><span>MethodFinder methodFor: {{#(1 2). [:x | Smalltalk saveSession. false]}.#()} "pls don't run this!"</span></p>
</div>
</blockquote>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p><span>you will surely expect the side effects to be executed?</span></p>
<p><span><br>
</span></p>
<p><span>> </span><span style="font-size: 12pt;">Just curious: what would be the block example for these examples?</span><span></span></p>
<div><br>
</div>
<p></p>
<p><span></span></p>
<div>MethodFinder methodFor: {{#(1 2). #even}. #(1)}. <b>'(data1 reject: data2) '</b></div>
<div>MethodFinder methodFor: {{#(1 2). #yourself descending}. #(2 1)}. <b>'(data1 sorted: data2) (data1 sort: data2) '</b></div>
<div><br>
</div>
Hey, maybe we should make a small game of it? :-) GuessTheSelectorGame :D
<p></p>
<p><span>Christoph</span></p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Mittwoch, 16. Oktober 2019 10:54 Uhr<br>
<b>An:</b> gettimothy via Squeak-dev; squeak-dev@mail.squeak.org<br>
<b>Betreff:</b> Re: [squeak-dev] MethodFinder.Blocks</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size:10pt; font-family:Arial; color:#000000">
Hi, Christoph.
<div><br>
</div>
<div>The method finder (or selector browser) has a hard-coded list of possible results (or messages) to not trigger dangerous side effects. Any new feature, such as that "quasi higher-order-message" symbol , would have to be added. Sure. But keep compatiblility
 with block arguments. :-)</div>
<div><br>
</div>
<div>Just curious: what would be the block example for these examples?</div>
<div><br>
</div>
<div><span style="font-family:Calibri,Helvetica,sans-serif; font-size:16px">MethodFinder methodFor: {{#(1 2). #even}. #(1)}</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif; font-size:16px">MethodFinder methodFor: {{#(1 2). #yourself descending}. #(2 1)}.</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif; font-size:16px"><br>
</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif; font-size:16px">Especially the latter seems kind of cryptic to me.</span></div>
<div><span style="font-family:Calibri,Helvetica,sans-serif; font-size:16px"><br>
</span></div>
<div>Best,</div>
<div>Marcel</div>
<div><br>
</div>
<div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style:solid; border-width:1px; margin-top:20px; margin-left:0px; padding-left:10px">
<p style="color:#AAAAAA; margin-top:10px">Am 14.10.2019 01:27:12 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p>Hi all,</p>
<p><br>
</p>
<p>I just got irritated as I evaluated</p>
<p><br>
</p>
<p><span>MethodFinder methodFor: {{#(1 2). #even}. #(1)}</span></p>
<p><br>
</p>
<p>and got no hit.</p>
<p>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</p>
<p><br>
</p>
<p><span>MethodFinder methodFor: {{#(1 2). #yourself descending}. #(2 1)}.</span><br>
</p>
<p><span><br>
</span></p>
<p><span>Also, #ifError: will prevent any error thrown if the block does not match the selector.</span></p>
<p><br>
</p>
<p>Looking forward to your answers :)</p>
<p>Christoph</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><span style="font-size:10pt; color:#808080"></span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</body>
</html>