Skip to main content
added syntax-highlighting
Source Link
Deduplicator
  • 9.3k
  • 5
  • 34
  • 53

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]; 
bool someConditionSatisfied = [complex expression]; 

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

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.

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.

simplified code formatting, fixed typos (interested in removing my downvote after rethinking this alternative aspect)
Source Link

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]; 

bool someConditionSatisfied = [complex expression]; 
This will give hint to code reader and save from introducing new function.

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

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

 bool someConditionSatisfied = [complex expression]; 
This will give hint to code reader and save from introducing new function.

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.

Source Link
cybevnm
  • 471
  • 4
  • 5

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

 bool someConditionSatisfied = [complex expression]; 
This will give hint to code reader and save from introducing new function.