From: matz@... (Yukihiro Matsumoto) Date: 2002-01-15T17:48:33+09:00 Subject: Re: a wishlist for ruby 2.0 Hi, In message "a wishlist for ruby 2.0" on 02/01/14, Mathieu Bouchard writes: |* add Thread.granularity=(v:Float),.granularity->Float, for setting and |getting the scheduler's default timeslice. | |* add Thread#max_stack_size=(v:Fixnum),#max_stack_size->Fixnum. I think these two requires specific threading implementation (or at least API). But I'm not sure it's possible (Windows thread has different model from pthread, right?) |* make Array include Comparable, simply because it defines #<=>. No. Arrays are comparable in special occations only (if all elements are comparable). "<=>" are hackish method for sake of sort. |* syntax: make "end" optional before ")". No. It's ugly and inconsistent. (I hate super paren). |* syntax: make foo.bar(2,3,5)=7 mean foo.bar=(2,3,5,7) Probably. |* remove Module.constants, which currently calls Object.constants as |Module#constants on the Object object; doing that would uncover the other |Module.constants, that is, Module#constants on the Module object. This is to show constants defined in outer modules in nest. Maybe it can be implemented by private Kernel#constants, just like local_variables. |* Module#included_modules(recurse=true) where |included_modules(false) would give a list of only _direct_ inclusions. |This is consistent with Module#instance_methods, except for the default |value. Maybe useful. |* Module#instance_methods(recurse=true,visibility=:default) where |visibility can also take values :public, :protected and :private. |Object.methods(recurse=true,visibility=:default) like the above, plus |recurse=false would fetch only singleton methods. remove all methods |obsoleted by those two extensions and make them emulated by |"ruby1-compat.rb". Why do you want to remove *_instance_methods? |* add argument to load/require to specify the context of |evaluation, and add to load/require/eval a way to override the default |line-numbering. I'm not sure what you mean. |* add File#open, that does like File.open, but on an existing file |handle. On open file, could raise exception or just close the file |automatically. change File.new so that with 0 arguments it creates a |closed File. I'm not sure what you mean. What for? matz.