Code formatting patterns (was: [squeak-dev] The Trunk: Compiler-cmm.275.mcz)

Eliot Miranda eliot.miranda at gmail.com
Sun Oct 6 17:36:58 UTC 2013


On Sat, Oct 5, 2013 at 2:04 PM, Chris Muller <asqueaker at gmail.com> wrote:

> >> This precise proposal is argued against by "Inline Message Pattern"
> >> (pg. 172 of the book).  Method body's would be starting in all
> >> different vertical places, your eyes have to "find" it.  And by
> >> consuming more vertical space it will result in more required
> >> scrolling.  Methods are often very short, would we really want to see
> >> the message pattern take up more space than the body?
> >
> > You're putting up a straw man here. Nobody is proposing to always put a
> keyword on a new line. That would make no sense at all.
>
> Oh, I thought that's what you were proposing as an alternative to
> Tim's pragma idea.  I guess I misunderstood.
>

Tim's pragma idea was a joke...


>
> > However, if you have a pattern with many and long keywords, then putting
> in explicit line breaks may be preferable to the automatic line wrapping.
> You would do that to group the keywords semantically.
>
> I think it's better to format the language syntax elements
> consistently, perhaps with a couple of exceptions like to:do: for the
> sake of vertical space.  I think this gives the reader a
> more-immediate awareness of the messages being sent, rather than
> "reading prose".  It's a program, not a poem.  :)
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20131006/f0f2cb4a/attachment.htm


More information about the Squeak-dev mailing list