Possibly older devs write like this because other languages (mostly outside of web stack AFAIK) can consider that a single exit point is safer, same goes for making sure (generally speaking) any 'if' has an 'else'. For example see MISRA-C-2004.
Sasa is a highly driven full stack software developer with background in finance and accounting. A relentless problem solver who is passionate about finding elegant solutions to problems at hand.
It’s almost certainly this. It’s always good to question convention, but when all of the more experienced devs follow a pattern, there’s probably a reason for it. It’s unfortunate that none of the ones you work with were able to explain why, instead of just being annoyed.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Possibly older devs write like this because other languages (mostly outside of web stack AFAIK) can consider that a single exit point is safer, same goes for making sure (generally speaking) any 'if' has an 'else'. For example see MISRA-C-2004.
That makes sense, you're probably right.
It’s almost certainly this. It’s always good to question convention, but when all of the more experienced devs follow a pattern, there’s probably a reason for it. It’s unfortunate that none of the ones you work with were able to explain why, instead of just being annoyed.