hi,
the title is misleading. maybe it could be revisited. it covers also the case where you have a 5 lines function and recommends not to use empty lines:
funcmax(x,yint)int{ifx>y{returnx}returny}
the empty line provides better readability and should be there.
Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
hi,
the title is misleading. maybe it could be revisited. it covers also the case where you have a 5 lines function and recommends not to use empty lines:
the empty line provides better readability and should be there.
Hi Tudor
I disagree.
The line does not add readability, and else statement will
hi,
no issues.
else is another anti pattern.
of course !!
Code Smell 36 - Switch/case/elseif/else/if statements
Maxi Contieri ・ Nov 28 '20 ・ 1 min read