Selon gwtmp01 / mac.com: > > > > Once you know what << does, there is no confusion. > > Isn't that a truism? > > As I said in my first post, I found the notation a > stumbling block for understanding the concept. Based > on the number of questions about the syntax that show > up on ruby-talk, I don't think my experience was particularly > unique. > Personally, I found the "class << object" *extremely* good at describing the concept it referred to. As soon as I understood the *concept*, I found it made sense, and helped me not to forget what the concept meant. > > There is a difference between a notation that is not suggestive > of anything in particular (an "empty vessel") and a notation that > is suggestive of something that is unrelated. > I disagree that the notation is suggestive of something unrelated. YMMV. > In any case, I was just throwing out some ideas for thought. > Here is another one: > > Ruby currently allows for: > > module M; end > class Y; end > class X < Y; end > class <<x; end > > How about just using > > object x; end > > to open up the singleton class? This sort of goes with my previous > thought > that we can think of an object and its eigenclass as simply two views of > the same object. > Using "object" to open up a *class* is about the most unintuitive thing I've ever read. Using a new keyword like "eclass" unjustifiably favours one denomination for those classes ("eigenclass") above others, while there is still *no* agreement on how to call them (AFAIK, matz himself still prefers to call them singleton classes). I still don't understand why the "class << object" notation is considered unintuitive. I myself read it as "enter the singleton class of the particular object". "<<" fits the "enter/come in" meaning quite well, and taken that way it is pointing in the right direction: you're entering a class. -- Christophe Grandsire. http://rainbow.conlang.free.fr It takes a straight mind to create a twisted conlang.