opennlp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aliaksandr Autayeu <aliaksa...@autayeu.com>
Subject Java5 for-each loops vs old-style loops
Date Wed, 09 Nov 2011 09:30:39 GMT
Dear all,

I would like to ask your opinion: what do you think about "for-each" loops
and old-style indexed loops. In my projects I have found that for-each
loops have several advantages:

1) code readability - code is easier to read
2) less code - and fewer possibilities for mistakes
3) eases refactorings - one have to change less code during future changes

There are many instances in OpenNLP where new style, shorter and cleaner
loops can be used. I might provide a patch. What do you think?

Aliaksandr

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message