Squeak coding style...
Lukas Renggli
renggli at student.unibe.ch
Sat Feb 28 13:36:12 UTC 2004
Hi Göran,
in the beginning when doing pair-programming with Adrian we had a lot of
discussions about this topic. Because we couldn't find a satisfactory
solution that we both agree on, we decided to go for the suggestions
given in 'Smalltalk - Best Practice Pattern'. I think the hints given
there are quite good and we can both live using them.
If we want to start with having coding conventions, I think we should go
for something as described in the book by Kent Beck else we just end up
in a never ending discussion.
> sillyFy: string
> "take the argument and sillyfy it"
> ^ string, ' is silly'.
Let me add a 7th point:
7. Put a space before (and after) binary-operators. Most people do it
for operators like #+, #*, #-, ... but are not consistent with #,
Luckily your example doesn't involve blocks, this would largely enhance
the possibilities of formating and opinions ;)
> PS. Perhaps we could write a "styleifier"? Some of these things
> are both easily detected and corrected.
I agree that the output of the default pretty-printer isn't satisfactory.
Is there something going coming with the new compiler?
Cheers,
Lukas
--
Lukas Renggli
http://renggli.freezope.org
More information about the Squeak-dev
mailing list
|