3 ms·
I worked on a big Java project where we had to do a lot of list/collection wrangling like that. I found that code using combinator chain/list comprehensions/Str
by klauserc 3y ago
I worked on a big Java project where we had to do a lot of list/collection wrangling like that. I found that code using combinator chain/list comprehensions/Streams/LINQ/etc. was significantly less error prone than code with hand-written loops. And that was in a team mostly staffed with junior engineers :)
- xmcqdpt2 3y agoAlso my experience. The only issue is that it's a bit annoying with breakpoints sometimes.
- throw1234651234 3y agoI am not saying use it instead of loops, I am saying don't chain the filters/maps/whatever endlessly. Even if only for the sake of being able to add breakpoints like the other commenter said.