Skip to main content
2 of 5
added 209 characters in body
Peter
  • 3.8k
  • 1
  • 14
  • 20

Rule of thumb: Use as few branches as possible, and as many branches as necessary.

If a branch is necessary or not is something you mostly learn from experience, but when in doubt: don't branch. You need branches when you need to modify the same code at the same time in 2 different ways.

Peter
  • 3.8k
  • 1
  • 14
  • 20