[squeak-dev] Manual line breaks in code

Tobias Pape Das.Linux at gmx.de
Wed May 4 18:39:16 UTC 2022


Hi

> On 4. May 2022, at 20:27, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
> 
> Hi Stef,
> 
> that's a strawman, I only talked about linebreaks, not about paragraphs. :-) We definitely should not merge all paragraphs automatically. The same applies to indentation. But precisely to make these elements visible, I think it is important that we do not intermix line breaks (for text composition) with paragraphs (semantic units)! We already have too many comments in the image where I often wonder "is this a new thought or did the author just try to keep the lines short?".
> 
> I hope you will agree that the following two texts are semantically identical? Then they should not be encoded differently in the source code of a method:

They should, for me.
Also, I never wish to read the second :D
-t
> 
> <pastedImage.png>
> 
> Best,
> Christoph
> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Stéphane Rollandin <lecteur at zogotounga.net>
> Gesendet: Montag, 4. April 2022 16:43:57
> An: squeak-dev at lists.squeakfoundation.org
> Betreff: Re: [squeak-dev] Manual line breaks in code
>  
> > I feel reminded of some recent discussions about pretty-printing. Some 
> > people apparently want to control every detail of the appearance of 
> > their source code (line-breaking, text composition etc.),
> 
> I would be one of these people, but I would say it otherwise:
> 
> when I layout my code, and my comments, I am writing for another human 
> being (most probably myself in the future). And when I read source code, 
> and comments therein, I read what another human being has written.
> 
> Indentation, line breaks, etc all convey some meaning (otherwise we 
> would not even bother about formatting in the first place).
> 
> To assume that an algorithm can properly "pretty-print" a hunman output 
> intended to another human, we must assume that nothing is lost in the 
> process.
> 
> Now if "details" did not matter, I could have said:
> 
> I would be one of these people, but I would say it otherwise: when I 
> layout my code, and my comments, I am writing for another human being 
> (most probably myself in the future). And when I read source code, and 
> comments therein, I read what another human being has written. 
> Indentation, line breaks, etc all convey some meaning (otherwise we 
> would not even bother about formatting in the first place). To assume 
> that an algorithm can properly "pretty-print" a hunman output intended 
> to another human, we must assume that nothing is lost in the process. Or 
> maybe I could have said:
> I would be one of these people,
> but I would say it otherwise:
> when I layout my code,
> and my comments,
> I am writing for another human being
> (most probably myself in the future).
> And when I read source code,
> and comments therein,
> I read what another human being has written.
> Indentation,
> line breaks,
> etc all convey some meaning
> (otherwise we would not even bother about formatting in the first place).
> To assume that an algorithm can properly "pretty-print" a hunman output 
> intended to another human,
> we must assume that nothing is lost in the process.
> 
> But to me, these details matter.
> 
> Stef




More information about the Squeak-dev mailing list