The IntelliJ default is mine as well.

If you can fit all arguments on a reasonably sized line, then do so.
 Otherwise, they get one line each (with a single indent, defaulting to
whatever's typical in the language).  If using multiple lines, the first
argument doesn't go on the same line as the method being called.  It's a
scheme that plays out quite nicely with diff tools as well.

I don't have an absolute line-length cutoff point either.  I'l aim for
around 80, but I'm not going to break things up simply because a line has
gone to 83 characters.


The alternative is just some ad-hoc arrangement: perhaps 5 args, then 3,
then 7.
This is software craftsmanship we're talking about here, not formations in
some team game!

The only time I'll break the convention is when successive arguments have a
natural association.  x/y co-ordinates would be one such example.


On 15 October 2010 13:52, Josh Berry <[email protected]> wrote:

> On Fri, Oct 15, 2010 at 1:19 AM, Ricky Clarkson
> <[email protected]> wrote:
> > Because I don't align anything past the initial structure-based
> > indentation level, it doesn't matter whether I use spaces or tabs, as
> > long as I don't mix them (I use spaces exclusively, but used to use
> > tabs exclusively).  However, had you done your alignment with tabs, it
> > wouldn't have helped.  A different tab width for me would also make
> > your code misaligned.
> >
>
> This is also a default for IDEA (again, not checking on eclipse):
>
>    public void foo(
>           int x,
>           String y
>    ) {
>        ...
>    }
>
> It is even more lines.  I can see arguments for readability on it, though.
>
> Of course, I mean to never ever claim for something as simple as the
> one above that this is somehow obviously more readable.  Nor do I
> think there is anything that is "obviously more" readable.  I think
> that is a very subjective, and often learned trait.  (Which is why I
> think so many folks claim that Java is a very "readable" language.  If
> you've learned it, it is more readable than it appears.)
>
> --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<javaposse%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>
>


-- 
Kevin Wright

mail / gtalk / msn : [email protected]
pulse / skype: kev.lee.wright
twitter: @thecoda

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to