<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 22, 2021 at 1:53 AM Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div id="gmail-m_792351782241707492__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr">
                                        Hi Eliot --<div><br></div><div>Thank you for the fix.</div><div><br></div><div>If you want me to follow to the formatting guidelines in Compiler & Co., I would appreciate it that you do so in Morphic & Co.</div><div><br></div><div>You changed the entire format of the method, which makes it challenging for me to review your fix.<span style="font-size:10pt"> </span></div><div><br></div><div>Best,</div><div>Marcel</div><div><br></div><div>P.S.: Nope, the coding style you use in Compiler & Co. is just different, not better. ;-)</div></div></blockquote><div><br></div><div class="gmail_default" style="font-size:small">It is backed up by a book by a leading author which includes justifications of all stylistic decisions.  So I assert that it is better in being carefully considered.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">To expand a bit, Smalltalk is an expression based language; every statement except for a method's message pattern, temporary declarations and pragmas are values.  There is no statement which is not a value.  Formatting using curly bracket patterns (left bracket at the end of a line) (in mine and other's opinion) obscures this, and is the import of a style used in statement oriented languages.  [ & ] are not equivalent to {  and } in curly bracket languages [ and ] define an object (a block), not merely delimit a purely syntactic entity, a sequence of statements.  And for visual thinkers rectangular block is an essential pattern.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I apologize for the distress caused.  However, I do think that rectangular block is a vastly superior style to what one might call "C with square brackets".  It reflects the fact that blocks are objects, uses far less vertical real estate, and jumps out at visual thinkers.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div id="gmail-m_792351782241707492__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr"><div><br></div><div><img id="gmail-m_7923517822417074927f6393ce-49c8-46ba-b0cf-2489e241a6e9" src="cid:17cb8afca4acb971f161" width="387" height="475"><br></div><div></div>
                                        <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px;min-width:500px">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 17.10.2021 20:34:48 schrieb <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif">Eliot Miranda uploaded a new version of Morphic to project The Trunk:<br><a href="http://source.squeak.org/trunk/Morphic-eem.1784.mcz" target="_blank">http://source.squeak.org/trunk/Morphic-eem.1784.mcz</a><br><br>==================== Summary ====================<br><br>Name: Morphic-eem.1784<br>Author: eem<br>Time: 17 October 2021, 11:34:29.99006 am<br>UUID: 7e3f944d-18fc-4a6f-bb86-03c8037ec775<br>Ancestors: Morphic-mt.1783<br><br>Text editing bug fixes.<br>A paragraph may not have been composed when interrogated for test and/or graphic coordinates. <br><br>A TextEditor for a Transcript may have no history but still be asked to openTypeInFor:/closeTypeIn:.<br><br>=============== Diff against Morphic-mt.1783 ===============<br><br>Item was changed:<br>  ----- Method: NewParagraph>>fastFindFirstLineSuchThat: (in category 'private') -----<br>  fastFindFirstLineSuchThat: lineBlock<br>     "Perform a binary search of the lines array and return the index<br>         of the first element for which lineBlock evaluates as true.<br>   This assumes the condition is one that goes from false to true for<br>    increasing line numbers (as, eg, yval > somey or start char > somex).<br>   If lineBlock is not true for any element, return size+1."<br>+       lines ifNil:<br>+                 [self composeAll].<br>-   <br>      ^lines<br>                findBinaryIndex: [ :each | <br>                   (lineBlock value: each)<br>                               ifTrue: [ -1 ]<br>                                ifFalse: [ 1 ] ]<br>              ifNone: [ :lower :upper | upper ]!<br><br>Item was changed:<br>  ----- Method: TextEditor>>closeTypeIn (in category 'typing support') -----<br>  closeTypeIn<br>    "See comment in openTypeIn.  It is important to call closeTypeIn before executing<br>         any non-typing key, making a new selection, etc.  It is called automatically for<br>      menu commands."<br>  <br>     | begin stop |<br>+       beginTypeInIndex ifNotNil:<br>+           [begin := beginTypeInIndex.<br>-  beginTypeInIndex ifNotNil: [<br>-                 begin := beginTypeInIndex.<br>            stop := self stopIndex.<br>                               <br>+             self history ifNotNil:<br>+                       [:myHistory|<br>+                          myHistory current<br>+                           contentsAfter: (stop <= begin<br>+                                     ifTrue: [self nullText]<br>+                                      ifFalse: [paragraph text copyFrom: begin to: stop-1]);<br>+                               intervalAfter: (stop to: stop-1);<br>+                            intervalBetween: (stop < begin<br>+                                    ifTrue: [stop to: stop-1]<br>+                                    ifFalse: [begin to: stop-1]);<br>+                                messageToUndo: (Message selector: #undoAndReselect);<br>+                                 messageToRedo: (Message selector: #redoAndReselect).<br>+                                 <br>+                     myHistory finishRemember].<br>-           self history current<br>-                         contentsAfter: (stop <= begin<br>-                             ifTrue: [self nullText]<br>-                              ifFalse: [paragraph text copyFrom: begin to: stop-1]);<br>-                       intervalAfter: (stop to: stop-1);<br>-                    intervalBetween: (stop < begin<br>-                            ifTrue: [stop to: stop-1]<br>-                            ifFalse: [begin to: stop-1]);<br>-                        messageToUndo: (Message selector: #undoAndReselect);<br>-                         messageToRedo: (Message selector: #redoAndReselect).<br>-                         <br>-             self history finishRemember.<br>  <br>              beginTypeInIndex := nil]!<br><br>Item was changed:<br>  ----- Method: TextEditor>>openTypeInFor: (in category 'typing support') -----<br>  openTypeInFor: editType<br>      "Set up UndoSelection to null text (to be added to by readKeyboard and backTo:),<br>          beginTypeInBlock to keep track of the leftmost backspace, and UndoParameter to tally<br>          how many deleted characters were backspaced over rather than 'cut'.<br>           You can't undo typing until after closeTypeIn."<br>  <br>+        beginTypeInIndex ifNil:<br>+              [beginTypeInIndex := self startIndex.<br>+                 self history ifNotNil:<br>+                      [:myHistory|<br>+                         myHistory beginRemember:<br>+                             (TextEditorCommand new<br>+                                       type: editType;<br>+                                      contentsBefore: (self hasSelection ifTrue: [self selection] ifFalse: [self nullText]);<br>+                                       intervalBefore: (beginTypeInIndex to: self stopIndex-1)<br>+                                      yourself)]]!<br>-         beginTypeInIndex ifNil: [<br>-            beginTypeInIndex := self startIndex.<br>-                 self history beginRemember: (TextEditorCommand new<br>-                   type: editType;<br>-                      contentsBefore: (self hasSelection ifTrue: [self selection] ifFalse: [self nullText]);<br>-                       intervalBefore: (beginTypeInIndex to: self stopIndex-1)<br>-                      yourself)].!<br><br><br></div></blockquote></div><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div>