42
"Useless syntax sugar": Numbered block parameters in Ruby
(zverok.space)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
I do think the unnumbered variant of such anonymous parameters is useful, if you've got a team of devs that knows not to misuse them.
In particular, folks who are unexperienced will gladly make massive multi-line transformations, all in one step, and then continue blathering on about
it
or similar, as if everyone knew what they were talking about and there was no potential for ambiguity.This is also particularly annoying, because you rarely read code top-to-bottom. Ideally, you should be able to jump into the middle of any code and start reading, without having to figure out what the regional abbreviations or
it
mean.