[Q] Coding Conventions for Squeak

Chris Muller afunkyobject at yahoo.com
Tue May 7 02:46:17 UTC 2002


Smalltalk with Style is a great book but, personally, I prefer Kent Beck's
"Rectangular Block" pattern for formatting blocks of code.  It allows me to
"see" the code-structure at a glance, without having to read line-by-line and
matching up brackets.

On page 44 of SWS, they even show something fairly close to rectangular block
(with a mis-aligned second line on the whileTrue) and say, "Although the Blue
Book [Goldberg 83] uses this style, most programmers do not separate the
opening bracket from the message."

This is almost certainly true if the book is referring to potential C++ or Java
programmers coming to Smalltalk (a plausible possibility for C++'rs in 1996,
when the book was published).  Once I got used to rectangular block, the
Java-style convention, where you put your opening brackets on the same line,
feels a bit "procedural", and doesn't have the "tiled" look of Rectangular
Block.




From:  "Dan Rozenfarb" <drozenfa at y...> 
Date:  Mon May 6, 2002  7:35 pm
Subject:  RE: [Q] Coding Conventions for Squeak

As a starting point, I would recommend:
Smalltalk with Style
Suzanne Skublics, Edward Klimas and David Thomas
Prentice Hall
ISBN 0-13-165549-3

And from there make your own way.

Regards,
Dan Rozenfarb

-----Mensaje original-----
De: squeak-dev-admin at l...
[mailto:squeak-dev-admin at l...]En nombre de Martin
Altobello
Enviado el: Lunes, 06 de Mayo de 2002 02:48 p.m.
Para: Lista Squeak
Asunto: [Q] Coding Conventions for Squeak


Hi,

I was designated to put together "coding conventions for Squeak",
something like its Java siblin done by Alberto Molpeceres.

The idea is to come up with conventions for class names, identifiers
names, indent style (pretty print is very nice for that), etc, and also
include examples of good smalltalk style code.

Has anybody done something like this before?

If not, what is in your opinion the best bibliography to use as source
for this? Preferably that can be found online. I have read reviews of
Smalltalk with Style that say that is *the* book for this kind of task.
Sadly, nobody in the group has it, nor it is in our faculties. If you
agree that one book can serve as suficient source for this, I'd
apreciate you'd share your experience.

Thanks,

Martín





__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com



More information about the Squeak-dev mailing list