2 ms·
Speaking of code readability, the article uses a function in the example called "isNotOpenSource()". If you have a function that returns a boolean, it's best no
by nameiscubanpete 8y ago
Speaking of code readability, the article uses a function in the example called "isNotOpenSource()". If you have a function that returns a boolean, it's best not to put another boolean in the function name i.e. "isOpenSource()" is cleaner and more readable.
Honestly, it's a code smell that makes me trust my initial reaction that the switch statement is indeed more readable than the authors solution.