<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi Chris.<div><br></div><div>Nice catch!</div><div><br></div><div>+1 for adding #keysInOrder and using it in #printElementsOn:.</div><div><br></div><div>-1 for choosing 'printing' as category of #keysInOrder (and #keysSortedSafely). <span style="font-size: 10pt">Maybe 'accessing' instead?</span></div><div><span style="font-size: 10pt">-1 for not having a comment in #keysInOrder ... could you explain the idea of "order" in contrast to "as is" with just a few words? :-) So that one can figure out when to use #keysSortedSafely and when to pick #keysInOrder</span></div><div><br></div><div>Hmmm... does "keys in order" sound almost like "are keys in order" and thus like a boolean result? I have no idea. :-D Did you also consider "keysOrdered" or "orderedKeys"? Just thinking about Color class >> #orderedCrayonColors.</div><div><br></div><div>Anyway, good idea. :-) I suppose that even if this method is used in any serialization format, the order would not harm the integrity of the contents.</div><div><br></div><div>Best,</div><div>Marcel</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;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 05.11.2019 02:25:27 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">Chris Muller uploaded a new version of Collections to project The Inbox:<br>http://source.squeak.org/inbox/Collections-cmm.858.mcz<br><br>==================== Summary ====================<br><br>Name: Collections-cmm.858<br>Author: cmm<br>Time: 4 November 2019, 7:25:14.227142 pm<br>UUID: 071a78c1-3ac2-4cad-b0e0-e7c2935504e1<br>Ancestors: Collections-pre.857<br><br>Let the printString of an OrderedDictionary reveal its key sequence.<br><br>=============== Diff against Collections-pre.857 ===============<br><br>Item was added:<br>+ ----- Method: Dictionary>>keysInOrder (in category 'printing') -----<br>+ keysInOrder<br>+      ^ self keysSortedSafely!<br><br>Item was changed:<br>  ----- Method: Dictionary>>printElementsOn: (in category 'printing') -----<br>  printElementsOn: aStream <br>         aStream nextPut: $(.<br>          self size > 100<br>            ifTrue: [aStream nextPutAll: 'size '.<br>                         self size printOn: aStream]<br>+          ifFalse: [self keysInOrder<br>-           ifFalse: [self keysSortedSafely<br>                               do: [:key | aStream print: key;<br>                                                nextPutAll: '->';                           <br>                                               print: (self at: key);<br>                                                space]].<br>     aStream nextPut: $)!<br><br>Item was added:<br>+ ----- Method: OrderedDictionary>>keysInOrder (in category 'printing') -----<br>+ keysInOrder<br>+  ^ self keys!<br><br><br></div></blockquote></div>