Issue #12697 has been updated by Yukihiro Matsumoto.

Status changed from Open to Feedback

I still believe

```
class String
  include Term::ANSIColor
end
```

is far better than `String.include Term::ANSIColor`. It is clearer and has more space to optimize.
Besides that the fact that `include` etc may have huge performance penalty is also a reason to prohibit casual class/module modification. Is there any reason to allow this in addition to saving extra few keystrokes?

Matz.


----------------------------------------
Feature #12697: Why shouldn't Module meta programming methods be public?
https://bugs.ruby-lang.org/issues/12697#change-60265

* Author: bug hit
* Status: Feedback
* Priority: Normal
* Assignee: Yukihiro Matsumoto
----------------------------------------
Methods like alias_method, attr_accessor, define_method, and similar

I don't think Ruby discourages this kind of meta programming, so why make it less convenient, by necessitating `send` or `module_eval`?



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>