Skip to main content
2 of 3
simplified code formatting, fixed typos (interested in removing my downvote after rethinking this alternative aspect)

I think that in many cases such a function is good style, but you may consider a local boolean variable as alternative in cases when you don't need to use this condition somewhere in other places e.g.:

bool someConditionSatisfied = [complex expression]; 

This will give a hint to code reader and save from introducing a new function.

cybevnm
  • 471
  • 4
  • 5