[squeak-dev] Manual line breaks in code

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Wed May 4 18:27:15 UTC 2022


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:


[cid:9866d517-72b6-4288-9a60-4d1e3f83a129]


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220504/40c2377a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 26000 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220504/40c2377a/attachment-0001.png>


More information about the Squeak-dev mailing list