On Thu, 4 Jan 2007, Trans wrote: > > Devin Mullins wrote: > >> My point was that we need not extract the cool methods into Pervasives >> in order to achieve metaprogramming simplicity. > > Yes, you're right. It's not neccessary. But it's also not > metaprogramming with guaranteed behavior. I tend to lean toward the > guaranteed bahavior myself. But the other is okay IF the methods stay > out or our way --but that doesn't mean they have to be ugly and it > certainly doesn't mean we should think we have solved the problem by > adding an extra ugly alias. > >> (On a side note: How do you find the true class of a BlankSlate?) > > In my version I added an intermediary. Eg. > > blankslate.self.class > > (though I've never been sure what the best name for it is) > i think you guys underestimate the difficulties requiring certain methods imposes. let's just say you wrote, oh, an xml generator using ruby's cool method_missing feature. now, you cannot easily have any xml tags that look like this xml.ancestors{ 'oops' } xml.class{ 'oops' } xml.display{ 'oops' } xml.extend{ 'oops' } xml.freeze{ 'oops' } xml.id{ 'oops' } xml.method{ 'oops' } xml.new{ 'oops' } xml.send{ 'oops' } xml.taint{ 'oops' } xml.type{ 'oops' } not to mention you cannot have tags with dashes or other weird chars in them.... but that's a separate design flaw with sort of thing. my point, is that send/send! is only the tip of the iceburg of name clashes one runs into when doing any serious metaprogramming/dsl work with ruby. it's one of the bugs people on this list simply ignore but production coders cannot: "you mean our food products list cannot use the tag 'freeze'!?" i have to ask anyone who does think this is true to point out their libraries which make use of either metaprogramming or dsls because i'm positive that any such libs, including my own, suffer from these kinds un-fixable flaws. i really think people are not seeing the forest for the trees. the issue with send/send! is not the name: it's that the concept of both needing certain methods to work a certain way and allowing, even encouraging via the popularity of dsl like syntaxes in ruby, that those same methods can be easily clobbered sets up a loosey-goosey mess that those of us who require our code to run un-attended for months on end get stomach cramps over. regards. -a -- in the practice of tolerance, one's enemy is the best teacher. - the dalai lama