Hello all,

Thanks for the write-up.

2011/10/2 SASADA Koichi <ko1 / atdot.net>

> Hi,
>
> We made a discuss tonight, the last day of RubyConf 2011 about 2.0
> features and several conclusion.
>
> I send a memo of discussion.  I hope it will boost a process toward 2.0.
>
>
> * Module#prepend and Module#mix
>
> - Module#mix => rejected
> - Module#prepend
>
> # Sorry, I can't write the discussion why we decide this specification.
>
>  class C0;
>    def foo; :C0; end
>  end
>
>  module M
>    def foo; :m; end
>  end
>
>  class C1 < C0
>    prepend M
>    def foo; :C1; end
>  end
>
>  C.ancestors #=> [M, C1, C0, Object]
>  C.new.foo
>
>  C1.new.foo #=> :m
>  C1.remove_method(:foo)
>  C1.new.foo #=> :m
>  C1.new.foo #=> C0
>
> * Allow duplication in same module in ancestor tree
>
>  module M0; end
>  module M1; include M0; end
>  module M2; prepend M0; end
>
>  class C
>    include M0
>    prepend M1
>    include M2
>    prepend M0
>  end
>
>  # Mx@My means Mx module included/prepended by My
>  C.ancestors #=> [M0, M1, M0@M1, C, M0@M2, M2, M0, Object]
>
>
IMHO, any "prepended module" is not part of the returned ancestors list
because they are not really ancestors. Instead the class that prepends the
module is in that prepended module's ancestoral chain, correct?

Here's what it would look like:

module M0; end
module M1; end

class C
  include M0
  prepend M1
end

C.ancestors    #=> [C, M0, Object]
M0.ancestors  #=> [M0]
M1.ancestors  #=> [M1, C]

A new method should be introduced to give the list of all the prepended
modules. For example:

C.prependors #=> [M1]

I am not sure if this is possible or not as I have no knowledge of ruby's
internal implementations but had a thought and just throwing it out there.

Thanks.

Anuj


* Object#confirm_to?([an array of symbols])
>
> It is same as:
>  [an array of symbols].all?{|sym|
>    obj.respond_to? sym
>  }
>
> * %s(foo bar) or %S(foo bar) notation
>
> Same as [:foo, :bar].  %s and %S is same as %w and %W?
>
> * Method#source_location
>
> Return also begin and end position in file.  You can get source code
> using it.  We don't decide how to return this location.
>
>  def m; end
>  p method(:m).source_location
>    #=> [file, line, beg, end]
>    # or
>    #=> [file, line, (beg .. end)]
>    # or others?
>
> * Float literal (1.0 or 3.2 or something) should return Rational object
> or not?
>
>  ex) 1.3 #=> Rational(3, 10)
>      1/2 #=> 0 (not changed integer division)
>      1/2.0 #=> Rational
>      1.fdiv(2) #=> 0.5
>
> Matz like this idea.  But it has compatibility issue?
>
> (not concluded)
>
> * nonblocking I/O
>
> not concluded.
>
> - Exception (EEOF etc) is too heavy for Rails app.
> - We need more lightweight exception object creation.
>
> * Threading (remove GVL or GIL)
>
> We don't remove GVL on 2.0.
>
>
> --
> // SASADA Koichi at atdot dot net
>
>


-- 
Anuj DUTTA