@[email protected] to [email protected] • 9 months ago"Useless syntax sugar": Numbered block parameters in Rubyzverok.spaceexternal-linkmessage-square33fedilinkarrow-up148arrow-down13cross-posted to: [email protected]
arrow-up145arrow-down1external-link"Useless syntax sugar": Numbered block parameters in Rubyzverok.space@[email protected] to [email protected] • 9 months agomessage-square33fedilinkcross-posted to: [email protected]
minus-squareEager EaglelinkEnglish4•9 months agoif “left” and “right” were relevant for addition, they would indeed be better names
minus-square@exussumlink1•9 months agoAre you against using a single letter variable like e for element in iterating over things?
minus-square@exussumlink1•9 months agoTo each their own. But man imagine if you have a collection of stuff that has a large name, and then having to figure out a short name other than e when iterating. I hope you’re not iterating over chemical names 😬
minus-squareEager EaglelinkEnglish3•9 months agoNo need to be over-descriptive. Anything at all more specific than e will probably be a better name
if “left” and “right” were relevant for addition, they would indeed be better names
Are you against using a single letter variable like e for element in iterating over things?
yes
To each their own. But man imagine if you have a collection of stuff that has a large name, and then having to figure out a short name other than e when iterating. I hope you’re not iterating over chemical names 😬
No need to be over-descriptive. Anything at all more specific than
e
will probably be a better name