you know go (the language) includes in the language the formatting so there is no discussion. Now I really like to see smalltalk code and not C code because..... It slows me down a lot when I read and I read a lot of code. :) Stef On Feb 28, 2010, at 8:51 PM, Adrian Lienhard wrote:
Hi Bill,
Don't worry. Nobody wants to force you to use his conventions :)
The question really only concerns the code of PharoCore. I think a consistent way of code formatting really is a good idea, even if not everybody agrees with each rule.
Cheers, Adrian
On Feb 28, 2010, at 18:43 , Schwab,Wilhelm K wrote:
Adrian,
Horrible is an understatement :) Your version is a big improvement. I frequently put ending brackets on their own line with indentation to aid in matching, but not always.
I do not (much) care what conventions the benevolent dictators select for Pharo, but I **do** care that it not be forced on my code that I retain for my own use. There should be ways to compile, export and load code and packagets w/o encountering automatic formatting. As long as that is the case, enjoy!!
Bill
-----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Adrian Lienhard Sent: Sunday, February 28, 2010 8:11 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] about code formatting in pharo
I've attached the coding conventions that we use at Cmsbox and netstyle.ch. They closely follow the suggestions of Kent Beck's "Smalltalk Best Practice Patterns".
According to these rules I would format the following example:
--------------- 1 to: (mine size min: his size) do: [ :ind | (mine at: ind) = (his at: ind) ifTrue: [ self instVarAt: ind put: (anotherObject instVarAt: ind) ] ]. ---------------
as:
--------------- 1 to: (mine size min: his size) do: [ :index | (mine at: index) = (his at: index) ifTrue: [ self instVarAt: index put: (anotherObject instVarAt: index) ] ]. ---------------
Putting "[ :ind |" on a new line and using multiple tab indentation looks horrible to me.
Cheers, Adrian
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project