<div dir="ltr">Hi All,<div><br></div><div>    I'm cleaning up the decompiler and the changes back in 2015 for deciding which characters are literal or not affects e.g. Date>>printOn: ::</div><div><br></div><div><div>printOn: aStream</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>self printOn: aStream format: #(1 2 3 $  3 1 )</div><div><br></div><div><br></div><div>This currently decompiles as</div><div><br></div><div><div>printOn: aStream </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>self printOn: aStream format: ((Array new: 6) at: 1 put: 1; at: 2 put: 2; at: 3 put: 3; at: 4 put: Character space; at: 5 put: 3; at: 6 put: 1; yourself)</div></div><div><br></div><div>I see four approaches</div><div><br></div><div>1. live with it</div><div><br></div><div>2. add an exception to LiteralNode>>printOn:indent: that invokes a special case Array print routine that forces printing as a Literal (this also requires special case printing in Character; I suggest we refactor all literal printing as printAsLiteralOn: if we take this approach)</div><div><br></div><div>3. relent and allow space (but no other whitespace character) to be considered as a literal</div><div><br></div><div>4. make an exception for Character space only when being printed in an Array:</div><div><br></div><div><div>shouldBePrintedAsLiteralVisiting: aSet</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>^self shouldBePrintedAsLiteral or: [self == Character space]</div></div><div><br></div><div>2. is I think the nicer.  It would allow LiteralNode to insist that a literal print itself as literal and hence would correctly decompile e.g. the legal (but rightly disapproved of)</div><div><div>shouldBePrintedAsLiteralVisiting: aSet</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>^self shouldBePrintedAsLiteral or: [self == $ ]</div></div><div><br></div><div>Thoughts, opinions?</div><div 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></div>