[hibernate-dev] Code style and whitespaces
Hardy Ferentschik
hardy at hibernate.org
Wed Jul 3 08:41:47 EDT 2013
On 3 Jan 2013, at 2:36 PM, Steve Ebersole <steve at hibernate.org> wrote:
> The "original" rule was that parens should always be separated by spaces. E.g.:
>
> if (isTrue ()) { ... }
>
> Is clearly fugly.
>
> if ( isTrue () ) { ... }
>
> To me is clearly more readable.
Sure, I agree on you on that
> Method/constructor declarations do not use spaces inside parens simply because the arguments list cannot contain parens. Same for exception catching btw..
But does that mean that you should not use spaces. Does it become less readable to use 'catch ( IllegalArgumentException e )' instead of 'catch (IllegalArgumentException e)'?
As Gunnar is saying, for consistency reason it would make sense to apply spaces in this case as well.
My 0.02$
--Hardy
More information about the hibernate-dev
mailing list