News for hackers. Stuff that matters.
Re:"Useless syntax sugar": Numbered block parameters in Ruby by billyruffian on Friday October 13, 2023 @03:52AM (#37867965)
Well, my attempt at a humorous aside didn't land.

To be strictly serious we are talking about block parameters in ruby which contain the values yielded to it which, in an enumeration, is likely to be a value object from a collection and only occasionally an index (where you've explicitly chained `#with_index` for e.g.). If you are nesting deep enough in ruby to call for `k` then, yes, it would be bad practice.

There are no comments on this comment yet.