Squeak coding style...

Chris Becker chbecker at neo.rr.com
Tue Mar 2 16:17:54 UTC 2004


Cees de Groot wrote:
> Hmm... I write code to be read, and often I want to preserve identation
> just as I wrote it, not because it complies with some code standard but
> because I've thought long and hard about it and that particular bit of
> whitespace represents my best shot at making the code readable. I am
> very much unconvinced that a code formatter will be able to make these
> decisions, unless it is as intelligent as I am, in which case I'll leave
> the programming tasks to it as well.

Yes, I agree. The "formatter" I'm referring to is the "prettyPrint" function
in the Squeak browser that Dan was talking about. It can be turned on at
your discretion.

> Personally, I think it'd be a good idea to *recommend* the style as
> descibed in Best Practice Patterns (because that book seems to mesh
> reasonably well with accepted practices in the Smalltalk work) and to
> watch out for 'violations'. But not to be anal about it.

Yes, and the existing pretty printer could be enhanced to display code that
conforms more closely to generally accepted standards.

Chris





More information about the Squeak-dev mailing list