I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
I'm the opposite. I'll use the short-circuit in a shell script, where it's common practice, but in JS I'll write it all out the long way, and I'll always include the block.
My preference for the short-circuit is b/c I think it's important to understand short-circuiting (as opposed to some things, which could be called "trivia"), and the short-circuit has the best signal to noise ratio.
My preference for removing the block is mostly because of better signal to noise ratio (ie less spammy), but also because I think it facilitates syntactic misunderstanding to use the block.
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.
I prefer the short-circuiting approach. The second one is okay if you remove the block.
I'm the opposite. I'll use the short-circuit in a shell script, where it's common practice, but in JS I'll write it all out the long way, and I'll always include the block.
My preference for the short-circuit is b/c I think it's important to understand short-circuiting (as opposed to some things, which could be called "trivia"), and the short-circuit has the best signal to noise ratio.
My preference for removing the block is mostly because of better signal to noise ratio (ie less spammy), but also because I think it facilitates syntactic misunderstanding to use the block.