On 26 November 2011 12:17, Hugo Hirsch <asf-...@hugo-hirsch.de> wrote:
> Hi,
>
> thanks for your ideas.
>
> Am 26.11.2011 13:13, schrieb sebb:
>> Is there a single Java style? or C style for that matter?
>
> To my mind this is c-style:
>
> public void foo()
> {
> ...
>
> while this is java style:
> public void foo() {
> ....
>
> This applies to many more code snippets :-p

I marginally prefer the latter, as it requires fewer lines, so one can
see more of the code on a single screen.

However the former is a bit easier to navigate visually; and it's
easier to temporarily change conditions. e.g.

if (condition)
{
    code
}

can be easily changed to force the condition by commenting it (most
IDEs have a line comment toggle).
I used that only recently in some debugging I was doing.

But it's not a reason to change.

> Of course code can be reformatted in various ways - but my proposal runs
> automatically and needs no fine tuning on each plattform or special
> IDE-settings.

However, that does not automatically ensure that the reformatting
preserves comments in a readable format.

I suggest you attach some sample before and after files to the JIRA.

> Yours,
> Hugo
>

Reply via email to