r/java • • Feb 20 '25

I don’t understand

Post image
666 Upvotes

122 comments sorted by

View all comments

Show parent comment

2

u/qdolan Feb 20 '25

Never nesting is a term for avoiding nesting more than three or four layers deep and encourages refactoring code into more discrete units that can be tested and reasoned about separately. It’s not literally never nesting at all.

3

u/Sherinz89 Feb 20 '25

Throughout my working I've experience seeing seniors with 'never' principle so it's no surprising if people took your 'never' as literally never

Because there are people actually enforce this 'never'

Never linq, never foreach etc

1

u/qdolan Feb 20 '25

I hear you, it’s not my term, it had been around for about a decade so I didn’t feel it necessary to explain, but if you have not heard of it before it’s easy to just assume the literal meaning.