Published in


Why You Shouldn't Nest Your Code

And how to get rid of nested code

While nested code has some advantages, it is often considered difficult to read and an anti-pattern: "Flat is better than nested."

Now you may wonder how to write non-nested code. Linus Torvalds, for example, is highly against nesting. Actually, you are allowed to nest, but only until level 3.



Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arnold Abraham

JavaScript, TypeScript and C#/.NET Tutorials/News/Best Practices by a German Software Engineer - Fun helps you to learn on the fly -->