<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Chris,</p>
<p><br>
</p>
<p>thanks for the <cmd>Space tip, this is great! (Btw, I would find it quite useful to press this combination again and again to select each time the parent expression up to the root -- similar to shift + blue button on morphs.)</p>
<p><br>
</p>
<p>I see your argument of hierarchic expressions, and I would not use something like zöglfrex in common Smalltalk code. However, I would find it irritating to read long SQL queries in a triangle layout, so finally I think it remains a domain dependent question.
 :)</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</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>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Chris Muller <ma.chris.m@gmail.com><br>
<b>Gesendet:</b> Donnerstag, 12. September 2019 05:15:49<br>
<b>An:</b> Thiede, Christoph<br>
<b>Cc:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] collect:thenDo: woes</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi Christoph,</div>
<div><br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="m_-7764504668837788825m_567436096982094284gmail-m_-8673027047066897729divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<div><span>Parentheses are not bad at all, but when your code becomes really lispy, I think the parentheses concept has reached its limits.</span></div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>What I think has actually reached its limits is passive reading of textual code, instead of
<i>active reading</i> of tile-based code like Scratch.  By active, I mean using the interface to delineate the nodes in the hierarchy of expressions, as you read and digest the method.</div>
<div><br>
</div>
<div>As it turns out, there is a particular combination of settings in Squeak (I really need to document them as a set...) that enables fairly rich expression-editing in the standard Squeak editor.  It involves a couple of trade-offs with the conventions of
 other text editors, but the payoff is huge.  In this environment the parentheses actually assist the active reading of the code.  Everyone knows about selecting expressions by clicking just inside the parentheses.  Another is Command+[space].  Still another
 assist is that the first 8 or so levels of parentheses can each be set to a unique color.  One last trick is to place the text cursor in front of a particular closing bracket, to know its corresponding opening, simply press that closing bracket key to highlight
 its corresponding opening bracket.  Just an alternative way to delineate the expression.</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="m_-7764504668837788825m_567436096982094284gmail-m_-8673027047066897729divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<div><span>Consider SQL or LINQ which do not indent each line to another level.</span></div>
<div>I do not find it easy to read this expression:<br>
</div>
<div><span><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px"><br>
</span></span></div>
<div><span>
<div>((((foo<br>
    collect: [:x|x barf])<br>
    select: [:y|y isKnorz])<br>
    inject: Kiffle into: [:clomb :blui | clomb baz: blui])</div>
<div>    reduce: [:z :w | z plong: w])<br>
    sum<br>
</div>
<div><br>
</div>
<div>Yes, you can use indentations, but the readability is still suboptimal:</div>
<div><br>
</div>
<div>((((foo collect: [:x|x barf])</div>
<div>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
    select: [:y|y isKnorz])<br>
        inject: Kiffle into: [:clomb :blui | clomb baz: blui])</div>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
            reduce: [:z :w | z plong: w])<br>
                sum</div>
<br>
</div>
<div>Imho brackets are the one concept and pipelines/queries are another one.</div>
</span></div>
</div>
</div>
</blockquote>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="m_-7764504668837788825m_567436096982094284gmail-m_-8673027047066897729divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<div><span>
<div><span style="font-family:Arial,Helvetica,sans-serif;font-size:small;color:rgb(34,34,34)"> </span></div>
</span></div>
</div>
</div>
</blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="m_-7764504668837788825m_567436096982094284gmail-m_-8673027047066897729divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<div><span>
<div>If you would like to concatenate really many expressions, brackets turn out not to be "sustainable" any longer, as each additional expression costs a new pair of brackets and a new indentation. So the parenthesis costs two dimensions of space where pipelines
 only need one, what makes it really hard to insert another dimension into the bracket monster:</div>
<div><br>
</div>
<div>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
((((foo collect: [:x|x barf])</div>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
<div>    select: [:y|y isKnorz])<br>
        inject: Kiffle into: [:clomb :blui |</div>
<div>            (clomb baz: [:deng | deng ploof: blui in: Roz])</div>
<div>                with: blui collect: [:zi :rad | zi pol: rad]])</div>
<div>                    reduce: [:z :w | z plong: w])<br>
                        sum</div>
</div>
<br>
</div>
<div>(Where is the inner expression??)</div>
<div>In contrast:</div>
<div><br>
</div>
<div>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
foo asZöglfrex</div>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
    collect: [:x|x barf];</div>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
<div>    select: [:y|y isKnorz];<br>
    inject: Kiffle into: [:clomb :blui |</div>
<div>        clomb asZöglfrex</div>
<div>            baz: [:deng | deng ploof: blui in: Roz];</div>
<div>            with: blui collect: [:zi :rad | zi pol: rad]];</div>
<div>    reduce: [:z :w | z plong: w];<br>
    sum</div>
</div>
</div>
</span></div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>
<div>Active reading improves the bandwidth of my understanding of code better than passive reading of the code as a stream of formatted text -- even when that stream of code is sweetened in some way to try to hide the precedence.  I think a hierarchy of expressions
 is easier to see and understand than a sequence of outputs piped to inputs.  The former mirrors the structure of the language.  The latter can only be fully understood by reading the entire sequence.</div>
<div></div>
<div><br>
</div>
<div>
<div>Best,</div>
<div>  Chris</div>
<div></div>
</div>
<div></div>
</div>
<div> </div>
</div>
</div>
</div>
</body>
</html>