harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hindess <mark.hind...@googlemail.com>
Subject Re: Idiomatic Java: return-at-method-end in Harmony
Date Mon, 26 Oct 2009 22:44:03 GMT

In message <c3755b3a0910261503l3cb0118br548d49b61e9d61fd@mail.gmail.com>,
Alexey Petrenko writes:
>
> 2009/10/27 Gregory Shimansky <gshimansky@apache.org>:
> >
> > On 27 October 2009 Jesse Wilson wrote:
> > >
> > > Harmony Team,
> > >
> > > Some of the Java code in Harmony suffers from being written in a
> > > non-Java style. In particular, our Java code often attempts to
> > > limit the number of exit points from a method. This approach is
> > > common in C/C++ programs because of the need to manually collect
> > > garbage.
> >
> > I don't think anyone who writes C/C++ cares about it. Usually
> > such style is a result of changes upon changes on some code with
> > intention to make minimal changes to it.
> >
> > > In patches I'll be submitting, I'll use the second form, which is
> > > idiomatic Java. I may also submit patches that convert the first
> > > style to the second, but usually only when there's other useful
> > > cleanup to accompany it. If you'd rather I not, please let me know
> > > and we'll arm-wrestle.
> >
> > If it works, don't fix it.
>
> Right... old programmers truth...

Modern programmers do refactoring and testing.  I'm more than happy with
this.  I want our code to be readable and using idiomatic style goes a
long way to achieving that.  Working is important but being maintainable
is important too.

+1 for making such changes but I'd prefer to see them as distinct
patches not part of broader changes so it is easier to verify that they
really are syntactic refactorings.

Regards,
 Mark.



Mime
View raw message