From: Joshua Ballanco Date: 2010-09-09T05:14:18+09:00 Subject: [ruby-core:32172] Re: Ruby 2.0 Wiki/Wish-list? On Sep 8, 2010, at 2:00 AM, Yukihiro Matsumoto wrote: > I think using #clone is better than allowing instances from > singleton_classes. Prototype-based inheritance vs. Class-based inheritance is largely a stylistic difference. There's not really anything that can be done with one that cannot be done with the other, so I agree that #clone "works". "Better" seems a matter of taste, and I'm willing to concede this point until I can come up with a more convincing argument. > Being lightweight with the cost of complexity (both concept and > implementation) may not be worth adding to the language, especially > when considering the cost is minimal for both time-wise and > space-wise. But avoiding "include MyModuleName" may be considerably > worth. I am not sure yet. The last time this topic came up, I believe I was still against namespaces. However, I've recently just had to fix a bug due to the "include" problem. I don't know that the concept needs to be that complex (implementation might be more so). These namespaces would essentially be Modules that could not do "include" or "extend". Instead, they could do a "using_namespace" that only removes a layer from the const lookup chain. I am not looking for scoping of monkey-patches as Robert mentioned. I think this is a separate, but interesting, topic. What I am looking for is something quite a bit simpler. Cheers, Josh