With the growing population of SOA (StackOverflow Oriented Architecture), keeping your code copy-paste friendly is becoming more and more important in demonstrating, developing and question answering.
You want your answer to be available instantly, free of fussy debugging. So copy-paste friendliness is a key property of your code robust enough to be ubiquitously runnable and, eventually, help you gain more reputation.
Adopting copy-paste style is amazing. Copy-paste boosts your productivity by freeing you from rumination on architecture complexity. Your boss will be happy with all the SLOC you commit. Your colleagues will respect your absolute ownership of the magnificent, enigmatic, labyrinthine code artifact built by the blob gleaned from everywhere.
Implicit conversion grants you additional robustness. Your code will never complain about ill input. Copy-paste without worry. Yeah
And you can enjoy this artistic equality table when debugging. Cool.
Never return early on invalid case. You can copy-paste it any where in your control flow. Yeah.
return is added, you have to remove the unnecessary control flow abrupting keyword when you need to copy paste these code into a deeply nested code block, which is quite common in CPS(copy-paste-style) programming.
Repetition here is for genericity. Every conditional path can be copy-pasted free of reading. They are very safe compile time constructs that preclude the very possibility of runtime
else on individual line is a bonus. You can copy-and paste code without looking at
else keyword! What a profit!
Never cache common subexpression. Declaring new variable name will force you read code and find declaration before copy-pasting.
Never factor out functions. Helpers require nonlocal function name lookup when copy-pasting. Dev experience terminator.
Oh, GG. I forgot GitHub Gists!