3 ms·
> you should always return in an 'if' branch Interesting. This code style simply doesn't need 'else' at all. I can surely say, if I was reading a codebase that
by shwestrick 6y ago
> you should always return in an 'if' branch
Interesting. This code style simply doesn't need 'else' at all. I can surely say, if I was reading a codebase that adhered to this discipline, it would be very easy to read.
What are your thoughts on how difficult it is to write code in this style?
- yawboakye 6y agoSee http://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/ http://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-val....