[Pharo-project] about code formatting in pharo
stephane.ducasse at inria.fr
Sun Feb 28 16:16:33 EST 2010
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. :)
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.
> On Feb 28, 2010, at 18:43 , Schwab,Wilhelm K wrote:
>> 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!!
>> -----Original Message-----
>> From: pharo-project-bounces at lists.gforge.inria.fr [mailto:pharo-project-bounces at lists.gforge.inria.fr] On Behalf Of Adrian Lienhard
>> Sent: Sunday, February 28, 2010 8:11 AM
>> To: Pharo-project at 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) ] ].
>> to: (mine size min: his size)
>> do: [ :index |
>> (mine at: index) = (his at: index) ifTrue: [
>> instVarAt: index
>> put: (anotherObject instVarAt: index) ] ].
>> Putting "[ :ind |" on a new line and using multiple tab indentation looks horrible to me.
>> Pharo-project mailing list
>> Pharo-project at lists.gforge.inria.fr
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
More information about the Pharo-dev