<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</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 all,</p>
<p><br>
</p>
<p>> <span style="font-size: 12pt;">using pretty-print just before saving your methods?  It already does that for you.  In fact, it even removes any comments at the end, which I DON'T like... </span></p>
<div><br>
</div>
<div>How can I reproduce this?</div>
<div><br>
</div>
<div>> <span>I've yet to find a pretty printer I can live with.  They all fuck up my code. </span></div>
<div><span><br>
</span></div>
<div><span>Without ever having worked a long time with any pretty printer, I venture to claim that there cannot be a perfect pretty printer, at least not for Smalltalk: IMHO, the right way to indent a method, to decide how long a line should be, depends on
 many circumstances. How long are the lines in the rest of the class or module? If I write a method for etoys, I will probably put a short #ifTrue:ifFalse: statement into one line, because it fits the overall code appearance of etoys. However, if I write a
 similar method for Metacello, which consists of many wonderful short methods, I will likely spread the same statement over three, if not five lines. It depends on the context. Plus, I would rather compress secondary edge cases a bit more than the primary core
 logic. A pretty printer cannot know these things without a semantical analysis, I suppose.</span></div>
<div><span><br>
</span></div>
<div><span>> </span><span style="font-size: 12pt;">I don't put blank lines at the end, but I want to be able to, if I want to.  Formatting should remain a separate gesture from saving.  Please don't silently save my code differently than what I thought I saved.</span><span>
<div><br>
</div>
<div>+1. Another argument for not forcing to change the code by compiler is that otherwise, it would be tricky to restore older versions of a method which then needs to be recompiled?</div>
<div><br>
</div>
<div>> <span style="font-size: 12pt;">Re: multiline comments, I strongly prefer multiline comments to be a single uniform paragraph and not a series of 'formatted' lines.  If you don't care for your comments to wrap fully back to the left margin, how about
 we handle it by the rendering of CodeHolder, and not making your comments difficult to write, edit, and certainly harder to read when whatever margin you chose is too wide for the viewer (causing half-line wraps every other line), or rather narrow which forces
 them to scroll further vertically unnecessarily.  Inserting a bunch of successive spaces and/or tabs just to make paragraphs really complexifies comments.</span>
<div><br>
</div>
<div>+1000! ;-) It is really inaesthetic to read a method displayed like this:</div>
<div><img size="72865" contenttype="image/png" id="img557963" style="" contextid="img716563" tabindex="0" height="180" src="cid:1092680e-ea6a-4918-b65a-ff24f9183c98"></div>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
</div>
</span></div>
<p></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<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>
</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> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Chris Muller <ma.chris.m@gmail.com><br>
<b>Gesendet:</b> Donnerstag, 20. Februar 2020 01:00:06<br>
<b>An:</b> Eliot Miranda<br>
<b>Cc:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] Compiling whitespaces (was: The Inbox: Compiler-ct.418.mcz)</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Eliot,</div>
<div><br>
</div>
<div dir="ltr">On Wed, Feb 19, 2020 at 1:53 PM Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<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 dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Feb 19, 2020 at 11:10 AM Chris Muller <<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>> wrote:<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 dir="ltr">
<div>-1.  You mean you're not using pretty-print just before saving your methods?  It already does that for you.  In fact, it even removes any comments at the end, which I DON'T like... </div>
</div>
</blockquote>
<div><br>
</div>
<div>I've yet to find a pretty printer I can live with.  They all fuck up my code. 
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>
<div>Since I know you like Rectangular Block, I thought you'd like mine which I keep in the inbox.  It's not perfect, but very good, IMO, have you tried it?</div>
<div></div>
</div>
<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 dir="ltr">
<div class="gmail_quote">
<div>No pretty printer deals with comments split across lines properly. </div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Mine does exactly the right thing which is to **not touch their contents**.</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 dir="ltr">
<div class="gmail_quote">
<div>There are too many edge cases.  Comments need to be formatted (see Behavior>>instSpec for an example).  Pretty printers appear to be god solutions in theory, but in practice they're half-assed. 
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Some strong words...</div>
<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 dir="ltr">
<div class="gmail_quote">
<div>Code highlighting, on the other hand, rocks. (Christoph, I can't wait to use requestCode:, very cool idea).</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Is that the same as syntax highlighting?</div>
<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 dir="ltr">
<div class="gmail_quote">
<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 dir="ltr">
<div><br>
</div>
<div>Formatting and saving should remain two separate gestures, commingling them would be surprising and frustrating, IMO...</div>
</div>
</blockquote>
<div><br>
</div>
<div>I'm not suggesting commingling them.  All i'm suggesting is stripping trailing white-space on passing code to compile:classified: et al (and *not* in compile:classified:). </div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>I don't put blank lines at the end, but I want to be able to, if I want to.  Formatting should remain a separate gesture from saving.  Please don't silently save my code differently than what I thought I saved.</div>
<div></div>
<div><br>
</div>
<div>Please simply change your pretty-printer to do NOTHING else than that.  Then it won't be "half-assed" anynmore, yes?   :)</div>
<div>_______<br>
</div>
<div><i>Re: multiline comments</i>, I strongly prefer multiline comments to be a single uniform paragraph and not a series of 'formatted' lines.  If you don't care for your comments to wrap fully back to the left margin, how about we handle it by the rendering
 of CodeHolder, and not making your comments difficult to write, edit, and certainly harder to read when whatever margin you chose is too wide for the viewer (causing half-line wraps every other line), or rather narrow which forces them to scroll further vertically
 unnecessarily.  Inserting a bunch of successive spaces and/or tabs just to make paragraphs really complexifies comments.</div>
<div>
<div><br>
</div>
<div> - Chris</div>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote>
</div>
</div>
</div>
</body>
</html>