From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz> |
Cc: | Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>, Markus KARG <markus(at)headcrashing(dot)eu>, List <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: PgJDBC: code reformat |
Date: | 2015-12-27 14:03:17 |
Message-ID: | CADK3HHLD3aAWcEPtUXVCxDrLzENvpAGbqC__dYfzrKEz1wh2VA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
+1 for Gavin's suggestion
and yes I think mandatory braces are required
Dave Cramer
davec(at)postgresintl(dot)com
www.postgresintl.com
On 27 December 2015 at 09:01, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
wrote:
> On 28/12/15 01:15, Dave Cramer wrote:
>
>> There doesn't seem to be a significant difference between sun style and
>> google style.
>> Personally I'd have a lot more whitespace than either of these styles.
>>
>> I tend to break up multiple lines.
>>
>> I prefer: if ()
>> {
>> do something
>> }
>>
>> vs if(){
>> do something
>> }
>>
>>
>> but it would appear this is not generally accepted.
>>
>> At the end of the day I'd vote
>>
>> 0 as well unless I could get enough support behind more whitespace
>>
>>
>> Dave Cramer
>>
>> davec(at)postgresintl(dot)com <mailto:davec(at)postgresintl(dot)com>
>> www.postgresintl.com <http://www.postgresintl.com>
>>
>> On 27 December 2015 at 04:04, Vladimir Sitnikov <
>> sitnikov(dot)vladimir(at)gmail(dot)com <mailto:sitnikov(dot)vladimir(at)gmail(dot)com>> wrote:
>>
>> I've fixed remaining errors:
>> https://github.com/pgjdbc/pgjdbc/tree/format_code
>>
>> Vladimir
>>
>>
>> --
>> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org
>> <mailto:pgsql-jdbc(at)postgresql(dot)org>)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-jdbc
>>
>>
>> I much prefer to line the brackets up on the same side, it makes the code
> a lot easier to read. Even in the days of screens with 25 lines of 80
> characters - now with considerably larger monitors, it makes even more
> sense.
>
> So I very much prefer the style:
>
> if (q)
> {
> do something
> }
>
>
> When I had poor eyesight it was easier, and after multiple eye operations
> & my eyesight is much improved - I still prefer the style with the brackets
> on separate lines.
>
> If I want to understand someone else's code sample; I refactor a copy of
> their code into this style, as it greatly increases the ease of reading it.
> The other style looks cluttered, and is harder to see the blocks of code
> clearly
>
>
> Cheers,
> Gavin
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Gavin Flower | 2015-12-27 14:16:03 | Re: PgJDBC: code reformat |
Previous Message | Gavin Flower | 2015-12-27 14:01:22 | Re: PgJDBC: code reformat |