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

tim Rowledge tim at rowledge.org
Thu Jul 14 17:34:16 UTC 2022



> 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.




More information about the Squeak-dev mailing list