[squeak-dev] The Inbox: Compiler-cmm.480.mcz

Jakob Reschke jakres+squeak at gmail.com
Thu Jul 14 17:48:07 UTC 2022


75em may also be a good limit, now that Number even understands such a
selector.
https://baymard.com/blog/line-length-readability

But seeing Tim's examples: before we start tweaking the indentation of
comments by the pretty printer, which would have it insert tabs or spaces
or anything else, better implement that proposal to display comment lines
left-aligned with the opening ", without requiring indentation characters
in the source text. Remember that other thread about whether or not to have
line breaks in comments? Somebody posted a screenshot from Dolphin
Smalltalk that shows what I am referring to.

To leave the comments untouched by the pretty-printer seems reasonable to
me for now.



Am Do., 14. Juli 2022 um 19:34 Uhr schrieb tim Rowledge <tim at rowledge.org>:

>
>
> > On 2022-07-13, at 11:35 PM, Marcel Taeumel <marcel.taeumel at hpi.de>
> wrote:
> >
> > If one would reformat comments, I would strongly suggest to NOT define
> line breaks via pixels but only based on a sane lines-per-character
> default. Maybe -- and only because Squeak uses proportional fonts by
> default -- use the text-layout algorithm to figure out the breaks.
>
> I claim it should just be the width of the frame you are rendering the
> text into.
>
> A luxury option would be to try to keep the left edge aligned with the
> starting location of the comment. Obviously there are edge case where the
> right edge is so close that we'd have to simply abandon hope, and so on.
>
> To try to illustrate -
>     self doSomethingOrOther + foo blather "a comment that goes on a bit
> about nothing very useful but drifts on and on and on like a speech by a
> particularly boring emeritus professor of classics after a booze fuelled
> Old Etonian conspiracy meeting"
>
> ... isn't terribly readable (ignoring the quality of the content!).
> If we could make it wrap more helpfully it might appear as
>     self doSomethingOrOther + foo blather "a comment that goes on a bit
> about nothing very useful but drifts on
>                                                                    and on
> and on like a speech by a particularly boring emeritus professor
>                                                                    of
> classics after a booze fuelled Old Etonian conspiracy meeting"
>
> .. .which I suggest looks a lot better. If your rendering frame is rather
> narrower it might end up
>     self doSomethingOrOther + foo blather "a comment that goes on a bit
>                                                                   about
> nothing very useful but
>                                                                   drifts
> on and on and on like a
>                                                                   speech
> by a particularly boring
>                                                                   emeritus
> professor of classics
>                                                                   after a
> booze fuelled Old
>                                                                   Etonian
> conspiracy meeting"
> Maybe if the right edge is closer than perhaps 20 ems one might wrap to
> the beginning of the line of code + a tab?
>     self doSomethingOrOther + foo blather "a comment that
>            goes on a bit about nothing very useful but drifts on
>            and on and on like a speech by a particularly boring
>            emeritus professor of classics after a booze fuelled
>            Old Etonian conspiracy meeting"
>
> Along with having Shout use italics for comments that would still be
> pretty readable.
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Oyster (n.), a person who sprinkles his conversation with Yiddishisms.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220714/6954c816/attachment.html>


More information about the Squeak-dev mailing list