Re:Why blocks make Ruby methods slower
by aaviran on Saturday February 28, 2015 @03:00PM
(#9124823)
I strongly agree.
Code is read from top to bottom, and finding out that a method uses a block after reading through most of it, is confusing, whereas `&block` in the method signature clarifies that this method will do something with a block.
The performance hit, as bad as it may be, is not something that should be a concern in many programs. After all, you are using Ruby...
Code is read from top to bottom, and finding out that a method uses a block after reading through most of it, is confusing, whereas `&block` in the method signature clarifies that this method will do something with a block.
The performance hit, as bad as it may be, is not something that should be a concern in many programs. After all, you are using Ruby...