On 9/27/06, Robert Dober <robert.dober / gmail.com> wrote: > On 9/27/06, Vincent Fourmond <vincent.fourmond / 9online.fr> wrote: > > However, there is quite a difference between String/string and > > Method/method : for String, you can only access the string via the > > String class. > > > Hmmm that is a point I might have overlooked in the definition > because as a matter of fact > 'this string' is a full fledged object (represented by the literal) while > > class A > def a; 42; end > end > > the "text" def a; 42; end > might not be considered a literal. > But is the literal requirement strict? Honestly I dunno Well, I for one think that it is. I made that comment on the discussion page of the wikipedia article you quoted over a month ago: http://en.wikipedia.org/wiki/Talk:First-class_object See the second comment "Is it or Ain't It" Note that that list of the characteristics of a first class object in the wikipedia article is preceded by: "Depending on the language, this can imply:" Which seems to make the whole list rather subjective anyway. Of course if you trace the wikipedia stance on what a literal value is you will find in the referenced article: "any notation for representing a value within programming language source code; for example, a string literal" So I'd say that the source code of the method is another example of a notation for expressing a value within programming language source code. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/