4 ms·
Can anyone please explain why ruby-core prefer refinements over classboxes?
by davnola 16y ago
Can anyone please explain why ruby-core prefer refinements over classboxes?
- steveklabnik 16y agoI'm no expert on classboxes, but there's some info here: http://timeless.judofyr.net/refinements-in-ruby http://timeless.judofyr.net/refinements-in-ruby (control-f for 'classb') I'd imagine that some of the reason is due to the fact that this is already implemented, but classboxes are not. I don't know anything about ruby-core, so I don't know how much that'd matter to them, but an almost identical but implemented feature seems much better than a more pure but unimplemented one.
- davnola 16y agoThe proposer suggests here http://goo.gl/4P4Wa http://goo.gl/4P4Wa (slide 39) and here http://goo.gl/p7ReQ http://goo.gl/p7ReQ that local rebinding violates the expectations of the callee, but it just seems to me to be very unintuitive.