3 ms·
Seriously? Open classes have some many problems[1], that making the scoped, like implicits are in Scala, allow library creators to monkey patch to their hearts
by DanielRibeiro 15y ago
Seriously? Open classes have some many problems[1], that making the scoped, like implicits are in Scala, allow library creators to monkey patch to their hearts content without messing up with gem creators.
The comments on the thread were quite positive as well (Charles Nutter did raise some important questions though[2])
[1] http://metaphysicaldeveloper.wordpress.com/2010/03/31/improving-ruby/ http://metaphysicaldeveloper.wordpress.com/2010/03/31/improv...
[2] https://groups.google.com/forum/#!msg/ruby-core-google/8SCc2rHOryg/PKLdBVk3zHwJ https://groups.google.com/forum/#!msg/ruby-core-google/8SCc2...
- petercooper 15y agoThere's also this recent ruby-core discussion: http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-core/39986?39811-40261+split-mode-vertical http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-cor...
- DanielRibeiro 15y agoGreat discussion. Thanks for the link. I understand the sentiment of adding more and a bit complex features. Of course, Ruby has continuations, which is probably one of the hardest things to use correctly, and very few people use it. The problem is that the alternatives, assuming the performance can be solved, are worse: use class methods all over, wrapper objects for the pimped classes, or just ignore safety and use Open Classes. All of which are more complex to gem creators. The more complex and the less fun we make it for people to create gems, the less gems we will have. I'll see if I can use ruby macros to implement it on 1.8.7, and make a better case for it.