DEV Community

Discussion on: Clean up your code with these tips!

andrewharpin profile image
Andrew Harpin

While this obviously works, I personally don't like this style of code.

Ok it takes up less screen real estate, but it's operation is not obvious.

Fundamentally code is a document and a document is useless if it is difficult or impossible to read.

lexlohr profile image
Alex Lohr

What is difficult to read it what is obvious to you strongly depends on what you're used to. Using logical gates is pretty common for example in Python.

So basically your judgement depends on your own bias for a certain style.