On Mar 15, 2014, at 12:17 AM, Ulf Zibis <[email protected]> wrote:
> Am 14.03.2014 17:10, schrieb Paul Sandoz:
>>> I'm willing to believe for-loop over array is as efficient as fortran-style
>>> loop
>>>
>>> + for (E e : a) {
>>> + action.accept(e);
>>> + }
>>>
>> Yeah, i previously went through a whole bunch of code replacing such
>> fortran-style loops with 'foreach' style based on automated code analysis.
>
> But wouldn't this help a little more? :
> + final E[] a = this.a;
> + for (E e : a) {
> + action.accept(e);
> + }
>
Thanks, i changed it to that.
>
> I more like the given style with less spaces:
> 3854 for (int i=0; i<a.length; i++)
> It better visualizes the 3 parts of the for statement.
>
Subjectively that irritates my eyes :-) non-subjectively it is inconsistently
applied.
Paul.