This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1926193751-1817808156-12518518355387 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Hi -- On Tue, 1 Sep 2009, Yehuda Katz wrote: > > > On Mon, Aug 31, 2009 at 4:09 AM, David A. Black <dblack / rubypal.com> wrote: > Hi -- > > On Mon, 31 Aug 2009, Yehuda Katz wrote: > > > > On Sun, Aug 30, 2009 at 10:09 PM, Joel VanderWerf > <vjoel / path.berkeley.edu> > wrote: > ¨ΒεθυδΛατϊ χςοτεΊ > ¨Βμασσ Πεςσοξ > prepend Exclaimer > ¨Βξδ > > > Is there some way to make the relationship more > visually obvious? > > class Person > Exclaimer > end > > class Person > ¨ΒεμΎΎ Εψγμαινε> end > > > Hmmm... seems potentially ¨Β βι¤Β ¨Βισυαμμγοξζυσιξη® > I'm happy with prepend, > in particular if we also make prepend a method on > Array. > > > I like the idea of the reverse #include but I'm not sure about the > name. The problem, for me, is that it's *too* array-like. The other > related operations don't have that same spatial/collection feel to > them. Somehow prepend doesn't sound like it's in the same semantic > space as include. > > Now I'm supposed to pony up a brilliant alternative :-) include! came > to mind. The "dangerous" aspect is that it occludes the current > version of the method. > > ¨Βοδυμ> ¨Βεζ > ¨Βξδ > ¨Βξδ > > ¨Βμασσ > ¨Βεζ > ¨Βξδ > > ¨Βξγμυδε δοεσξ§αζζεγτ ιξσταξγε> ¨Βξγμυδε βμογλσ τθισ γμασσ§σανεξανεδ νετθοδ> ¨Βξδ > > Mind you, I've always been intrigued by the idea of ancestors being > a fully read-write array. But the current semantics of include are not > very array-like, so I'm not sure about "prepend". > > > We asked Matz about that, and he felt it was a bit *too* much. One major > problem is that it would affect classes and not just modules, with more > dubious semantics. True. One question about the prepend idea: module M def x; "M's x"; end end module N def x; "N's x"; end prepend M # or whatever it's called :-) end class C include N end Would N have sacrificed itself, so to speak, to M, so that: C.new.x would print "M's x"? David -- David A. Black / Ruby Power and Light, LLC / http://www.rubypal.com Ruby/Rails training, mentoring, consulting, code-review Latest book: The Well-Grounded Rubyist (http://www.manning.com/black2) September Ruby training in NJ has been POSTPONED. Details to follow. --1926193751-1817808156-12518518355387--