News for hackers. Stuff that matters.
Re:Ruby 3.0.0 RC1 by chrisseaton on Monday December 21, 2020 @11:18AM (#25496244)
> While these can eventually come in handy sometimes, they are by and large seldom used

I don't think they are seldom used in practice - I think large parts of the Ruby ecosystem use them pervasively, even if you disregard Rails.

But even if we don't agree on that - it's missing the point. The point is you pay for much of Ruby's metaprogramming, even if you aren't using it. So not using it doesn't help you.

A concrete example is that you pay for `Kernel#binding` every single time you finish using a local variable but Ruby retains it for the binding, even if you never ever call `Kernel#binding`. Even JITs cannot remove this cost.

Re:Ruby 3.0.0 RC1 by pizza234 on Tuesday December 22, 2020 @06:34AM (#25505253)
> The point is you pay for much of Ruby's metaprogramming, even if you aren't using it.

I don't think there has been any meaningful attempt at assessing the performance of Python vs Ruby.

If we consider the benchmarks game, their performance is comparable.

I assume that PyPy is faster, but whether to consider it representative of Python's general performance is arguable.

Re:Ruby 3.0.0 RC1 by jashmatthews on Friday December 25, 2020 @04:13AM (#25535302)
Which cost do you mean? Needing to keep the value alive for deoptimization if Kernel#binding is actually called or?