Hi all, I fully agree with Jon’s thoughts: Lamda expressions are no silver bullet, as mentioned by him... Using 'foreach' more often, is valid as readability is increased and somehow this feels "natural“ nowadays.
Best Martin — https://twitter.com/mawiesne > Am 05.12.2018 um 17:21 schrieb Jonathan Gallimore > <[email protected]>: > > Just my two cents... > > I don't any issue with switching to foreach, like shown in the example > given. I personally would not want to switch to lambdas everywhere "just > because we can". I've seen some really awful code using lambdas everywhere > just because it could. Turned out to be much harder to read rather than > easier. The other issue is if we make sweeping changes right across the > codebase, we risk getting conflicts with on-going work in people's PRs. > > Code cleanup and making it easier to read is welcome, but I'd suggest > breaking it up into small specific pieces rather than broad PRs, and > discussing the changes here. > > Thanks > > Jon > > On Wed, Dec 5, 2018 at 3:39 PM Bruno Baptista <[email protected]> wrote: > >> Actually... What Richard said changed my mind. >> >> Why not just use a foreach lambda when possible? >> >> Bruno Baptista >> https://twitter.com/brunobat_ >> >> >> On 05/12/18 15:34, Richard Zowalla wrote: >>> Hey, >>> >>> imho it would be a good improvement to reduce legacy code constructs >> from below Java 8 in the master branch. >>> >>> Some PRs are just merged into the master related to the use of diamond >> operator etc. and other stuff. >>> >>> However, we should come to some general agreement about this imho. >>> >>> And of course open a JIRA to signalize someone is working on it. >>> >>> Just my personal opinion. >>> >>> Best, >>> Richard >>> >>> >>> Am 5. Dezember 2018 16:27:50 MEZ schrieb "Otávio Gonçalves de Santana" < >> [email protected]>: >>>> Hello everyone, I'm studying the code, mostly the container module. It >>>> seems that in the master we support Java 8. >>>> My question: Does make sense to create PRs to update some APIs to a >>>> modern >>>> way? >>>> I mean, e.g.: >>>> >>>> for (int i = 0; i < rules.length; i++) { >>>> rules[i].validate(appModule); >>>> } >>>> >>>> To >>>> >>>> for (ValidationRule rule : rules) { >>>> rule.validate(appModule); >>>> } >>>> >>>> >>>> >>>> Ps: That does not impact in performance, just does the code >>>> cleaner/readable and more natural to maintainer IMHO. >>
smime.p7s
Description: S/MIME cryptographic signature
