[Wellington-pm] My new indentation technique is unstoppable!!
Sam Vilain
sam at vilain.net
Thu Aug 14 20:22:53 PDT 2008
Richard Hector wrote:
> On Fri, 2008-08-15 at 13:52 +1200, Sam Vilain wrote:
>
>> eg, not
>> Object->new( param => foo,
>> ␠␠␠␠␠␠␠␠␠␠␠␠␠param => bar);
>> function(arg, arg, arg,
>> ␠␠␠␠␠␠␠␠␠arg, arg);
>> but:
>> Object->new
>> → ( param => foo,
>> → ␠␠param => bar,
>> → );
>> function
>> → ( arg, arg, arg,
>> → ␠␠arg, arg,
>> );
>>
>> this is the sort of thing that leads to easy mergability of code,
>> because the logical parts of the function call are all on seperate
>> lines, and to add a list item you can just insert a line.
>
> But to delete the first argument or add a new first argument, you have
> to edit the line with the opening (.
>
> Why not
>
> Object->new (
> param => foo,
> param => bar,
> );
>
> with either tabs or spaces.
Yeah, that's a good point. I guess my primary reason is that then emacs
wanted to indent the following lines after the bracket, which is a
pretty poor reason ;-)
This would make it more consistent with: if (condition) { ... }
indenting, too.
Sam
More information about the Wellington-pm
mailing list