Aijan@programming.dev to Programming@programming.dev · 28 days agoSelf-documenting Codelackofimagination.orgexternal-linkmessage-square68fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-linkSelf-documenting Codelackofimagination.orgAijan@programming.dev to Programming@programming.dev · 28 days agomessage-square68fedilink
minus-squarehex@programming.devlinkfedilinkarrow-up0·28 days agoI mean, boolean short circuit is a super idiomatic pattern in Javascript
minus-squareclutchtwopointzero@lemmy.worldlinkfedilinkarrow-up0·27 days agoBecause on JS the goal is to shave bytes to save money on data transfer rates
minus-squarehex@programming.devlinkfedilinkarrow-up0·27 days agoIt’s not that deep. It looks nice, and is easy to understand.
minus-squarearendjr@programming.devlinkfedilinkarrow-up0·27 days agoI think that’s very team/project dependent. I’ve seen it done before indeed, but I’ve never been on a team where it was considered idiomatic.
I mean, boolean short circuit is a super idiomatic pattern in Javascript
Because on JS the goal is to shave bytes to save money on data transfer rates
It’s not that deep. It looks nice, and is easy to understand.
I think that’s very team/project dependent. I’ve seen it done before indeed, but I’ve never been on a team where it was considered idiomatic.