DISQUS

Life is grand: Return *

  • Andrew Peace · 3 years ago
    I think this is correct to some extent, but as with most rules, the best coders, IMO, know when to break them. I'd probably re-define this to say "only have well-known and obvious return points".

    When tidying up some code that had seriously evolved beyond its original purpose recently, one of the most useful and important things I did was consolidate and audit the return and exit paths, and make them sane and obvious. This really helped the clarity of the code.
  • Paul Watson · 3 years ago
    Absolutely right Andrew. That is why I said "in moderation." Got to know when to break your own rules.
  • Shog9 · 3 years ago
    If you're talking to idiots, use small words. If you're writing for idiots, use simple constructs.
    And that's enough about that.