Re: class destruction (evil genius metaprogramming)
by dblack other posts by this author
Jun 16 2007 11:22AM messages near this date
Re: class destruction (evil genius metaprogramming)
|
Re: class destruction (evil genius metaprogramming)
Hi --
On Sun, 17 Jun 2007, Devin Mullins wrote:
> dblack@[...].net wrote:
> > I do sometimes wonder what would happen if the ancestry array were
> > writeable. It could be interesting. I haven't thought through the
> > possible pitfalls.
>
> You mean, like Object#become? :)
Not exactly. As I understand it, #become involves references changing
from one object to another. I'm thinking of something more like:
module M
end
a = Object.new
class << a
ancestors.unshift(M) # essentially same as a.extend(M)
end
> Seriously, how would that play with the core classes, which don't keep their
> state in instance variables?
I'm not sure how that would matter specifically. What problem are you
envisioning? (Not that the whole thing wouldn't be a train-wreck
anyway :-)
David
--
* Books:
RAILS ROUTING (new! http://safari.awprofessional.com/9780321509246)
RUBY FOR RAILS (http://www.manning.com/black)
* Ruby/Rails training
& consulting: Ruby Power and Light, LLC (http://www.rubypal.com)
Thread:
Giles Bowkett
Rick DeNatale
dblack
Robert Dober
dblack
Robert Dober
Giles Bowkett
dblack
Stephen Smith
Nathan Taylor-Hoover
Giles Bowkett
dblack
Giles Bowkett
Rick DeNatale
dblack
Devin Mullins
dblack
Gregory Brown
Giles Bowkett
|