@PythOnRails@programming.dev to Programming@programming.dev • 1 year ago"Useless syntax sugar": Numbered block parameters in Rubyzverok.spaceexternal-linkmessage-square21fedilinkarrow-up145arrow-down13cross-posted to: hackernews@derp.foo
arrow-up142arrow-down1external-link"Useless syntax sugar": Numbered block parameters in Rubyzverok.space@PythOnRails@programming.dev to Programming@programming.dev • 1 year agomessage-square21fedilinkcross-posted to: hackernews@derp.foo
minus-squareEager EaglelinkfedilinkEnglish4•edit-21 year ago The liberty to not name things that are obvious. and that’s yet another way to end up with hard to read code. Variables hold values that have meaning. Learn how to name things and you’ll write good code.
minus-square@exussum@lemmy.worldlinkfedilink0•1 year agoThis makes me want to write a function for you to add to numbers where the variables are leftumber and rightnumber, instead of x and y.
minus-squareEager EaglelinkfedilinkEnglish1•1 year agoif “left” and “right” were relevant for addition, they would indeed be better names
minus-square@exussum@lemmy.worldlinkfedilink1•1 year agoAre you against using a single letter variable like e for element in iterating over things?
and that’s yet another way to end up with hard to read code.
Variables hold values that have meaning. Learn how to name things and you’ll write good code.
This makes me want to write a function for you to add to numbers where the variables are leftumber and rightnumber, instead of x and y.
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?