by tbrock · 14y ago · 0 comments
- Named arguments
- Multiple inheritance (traits)
- Incremental performance improvements over 1.9's VM
- Better compatibility with non-unix environments and small/constrained devices (embeddable)
- Sandboxed VM's (VM per thread)Also, there won't be MVM (Sandboxed VMs) on this release.
Thus it (should) allow you to do things like excluding or renaming methods/traits ala Perl roles - https://metacpan.org/module/Moose::Manual::Roles#METHOD-EXCL...
Refinements proposed in Ruby 2.0 allows you to localise monkey-patching much like you can do in Perl with dynamic scoping (for e.g.: http://news.ycombinator.com/item?id=1603321 | http://news.ycombinator.com/item?id=3455507). For further info on Ruby refinements see here: http://timelessrepo.com/refinements-in-ruby
Traits are an improvement to mixins. IIRC Matz gave a talk (RubyConf 2010?) where he describes the proposed traits implementation. Here's one set of slides (not Matz's talk) which also shows some traits examples - http://www.slideshare.net/fabiokung/ruby-20-to-infinity-and-...