re: What’s an unpopular software opinion you have? VIEW POST


clean code is not fast code!!!!

Let me explain more, clean code can be fast and it is good to have code that will be easily understandable but my point is that you could have messier code that is faster and fix its readability issues with clear well thought out comments.

So just because a piece of code is "messy" does not mean your cleaner code is faster.

Speaking from the interpreter side of things


Generally, it would be good to explain your statement a bit.

I would say this is not always true as good optimizing compilers can turn clean code (whatever exactly you mean by that) into very fast code.

But it definitely can be true in certain situations.

However, the question is: Does it matter? My first goal
Is always to have maintainable and understandable code. I optimize only when I need to. This might result in less readable code. But I only do it if there is a serious performance problem or the requirements are not met.


You're not ALWAYS going to maintain your code. The better code you write, the lesser other person have to struggle.

code of conduct - report abuse