8 ms·
I think you are overlooking a number of things, first of all the code examples are not just prettier they are faster as they bypass test conditions. Save possib
by tarikjn 10y ago
I think you are overlooking a number of things, first of all the code examples are not just prettier they are faster as they bypass test conditions. Save possible compiler optimization or CPU branching strategies which I am not too familiar with, this would at least still save execution cycles in certain cases/languages. Might seem small here, but when it's for library code, code that gets duplicated in memory and needs to also copy variables and closures (i.e. rows on a webpage), or simply a practice all across the codebase, it will have effect.
Not only that, but as the author outlined it's easier to read and parse for another developer, and there are less chances for errors.
I, for one, strongly believe that pushing software excellence reduce the number of high pressure situation to "get shit done", as it's better to take control of the code than other way around.