<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Chris Muller wrote:
<blockquote
 cite="mid:CANzdToEre+5Xxo4sgoLWXjup1eB5JiHNuUZAJgOuwM-YEtn7bg@mail.gmail.com"
 type="cite">
  <blockquote type="cite">
    <pre wrap="">Bert, I like your vertical alignment of square braces for blocks.  For
myself, this is my only absolute formatting rule, excepting only when
opposing braces fit the same line.  Unfortunately most Smalltalk code puts
the closing brace as soon as possible at the end of the last statement of
the block.  Sometimes three or four closing braces pile up together at the
end of a line, and it is slow to isolate the matching open braces. (Maybe
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Not if you use Shout.  Each level of parentheses and blocks specifies
its own color.
  </pre>
</blockquote>
Sure. Color helps.  I do use Shout. But your still have to "search" for
the color of the opposing bracket.  It is not "immediately" obvious
like vertical alignment.<br>
<blockquote
 cite="mid:CANzdToEre+5Xxo4sgoLWXjup1eB5JiHNuUZAJgOuwM-YEtn7bg@mail.gmail.com"
 type="cite">
  <pre wrap="">
Nor if you simply click in the inner edge of the bracket.  Or Command+Space it.
  </pre>
</blockquote>
That also helps.  But it requires interaction. It is not as immediately
obvious as vertical alignment. <br>
Also you cannot view two of these simultaneously.  With vertical
alignment multiple levels are visible simultaneously.<br>
<br>
<blockquote
 cite="mid:CANzdToEre+5Xxo4sgoLWXjup1eB5JiHNuUZAJgOuwM-YEtn7bg@mail.gmail.com"
 type="cite">
  <pre wrap="">
Most Smalltlak code employs Rectangular Block because it's an
object-oriented format.  Like a text-version of Scratch tiles.
  </pre>
</blockquote>
Maybe I miss something, but I don't see how that form is particularly
'object-oriented' - except that it is common to Smalltalk and Smalltalk
is object-oriented.  I haven't used Scratch, but reviewing [1] step 8 I
see 'forever', 'repeat', 'if' all have strong visible vertical
alignment of their left hand edge, and an empty blank line beneath. <br>
<br>
[1] <a class="moz-txt-link-freetext" href="http://nebomusic.net/scratchlesson1/scratchexercise1.html">http://nebomusic.net/scratchlesson1/scratchexercise1.html</a><br>
<br>
<blockquote
 cite="mid:CANzdToEre+5Xxo4sgoLWXjup1eB5JiHNuUZAJgOuwM-YEtn7bg@mail.gmail.com"
 type="cite">
  <pre wrap="">
  </pre>
  <blockquote type="cite">
    <pre wrap="">that indicates other architectural issues with the code, but the reality is
these situations occur.)  As a slight twist of my own to your last example,
I indent the first statement one tabstop.

[ mySoundRecorder
                copyTo: resultBuf from: j to: (j + n - 1)
               from: buf startingAt: firstInBuf
               normalize: nFactor dcOffset: dcOffset
] on: AttemptToWriteReadOnlyGlobal do:
[ :noti |
noti someOtherMethod.
noti resume: true
]
    </pre>
  </blockquote>
  <pre wrap=""><!---->
The above, by contrast, looks and feels procedural, with the brackets
"delimiting" the starts and ends of code segments.


  </pre>
</blockquote>
<br>
But a block is a code segment, is it not? which IS in fact delimited by
brackets. I understand that it might 'feel' procedural since Smalltalk
(which happens to be OO) has typically formatted it one way, and a lot
of other languages (which happen to be procedural) have formatted it
another, but I don't understand there is a causal link between the
formatting whether it is actually more procedural or object-oriented.  <br>
<br>
My unsubstantiated belief is in the very early days, screen real-estate
was more of a premium, and it made sense to avoid wasting lines
dedicated to only a closing brace.  This was the same situation with
early procedural languages, but good practice with those have moved
on.  It is probably more important for procedural languages since code
segments tend to be longer and more nested, but Smalltalk commonly
having shorter methods shouldn't preclude the practice being applied to
Smalltalk. Of course, cultural norms are much harder to address than
technical merits.<br>
<br>
cheers -ben<br>
</body>
</html>