Skip to main content
Post Made Community Wiki by DPD
added 3 characters in body
Source Link
drekka
  • 1.3k
  • 1
  • 9
  • 20

I prefer to employ guard blocks where ever I can for two reasons:

  1. TheThey allow a quick exit given some specific condition.
  2. The remove the necessity for complex and un-necessary if statements later in the code.

Generally speaking I prefer to see methods where the core functionality of the method is clear and minimal. Guard blocks help to visualvisually make this happen.

I prefer to employ guard blocks where ever I can for two reasons:

  1. The allow a quick exit given some specific condition.
  2. The remove the necessity for complex and un-necessary if statements later in the code.

Generally speaking I prefer to see methods where the core functionality of the method is clear and minimal. Guard blocks help to visual make this happen.

I prefer to employ guard blocks where ever I can for two reasons:

  1. They allow a quick exit given some specific condition.
  2. The remove the necessity for complex and un-necessary if statements later in the code.

Generally speaking I prefer to see methods where the core functionality of the method is clear and minimal. Guard blocks help to visually make this happen.

Source Link
drekka
  • 1.3k
  • 1
  • 9
  • 20

I prefer to employ guard blocks where ever I can for two reasons:

  1. The allow a quick exit given some specific condition.
  2. The remove the necessity for complex and un-necessary if statements later in the code.

Generally speaking I prefer to see methods where the core functionality of the method is clear and minimal. Guard blocks help to visual make this happen.