------ art_40336_10353328.1159393833651 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 9/27/06, Vincent Fourmond <vincent.fourmond / 9online.fr> wrote: > > Robert Dober wrote: > > On 9/27/06, gwtmp01 / mac.com <gwtmp01 / mac.com> wrote: > >> > >> > >> <SNIP> > >> > >> Another example might be the array of bytes that is associated with > >> an instance > >> of String. Strings are first class objects but the data associated > >> with a string > >> is not. > > > > > > ty Gary you make my point, when we talk about strings, methods objects > we > > talk about the interfaces Ruby gives us to them, everything else is out > of > > context, implementation if you want. > > > > IOW there is no string or method in Ruby, there is only String, Method, > > UnboundMethod etc, etc. > > we use the words string method to explain concepts to human beings, Ruby > is > > not a human being (yet ;). > > > 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 For the methods, you fortunately don't need the Method > class to execute methods... > > The Method class is just a thin facility (too thin, IMHO) provided for I agree completly, I too would like more service but that does not have any influence on "first class". Immagine a class where you delete all inherited methods, an object of that class would still be "first class" (bare the literal requirement, or we could strip all methods from Hash e.g. and we would have literals) Hmmm it seems that I am sticking out my neck here !!! simple methods manipulations, whereas String is a full-blown string > manipulation library. > > But if you want to copy methods from one place to the other, try > programming some C extensions to do that ;-)... No Ruby can to that as I have shown above, and you said the C word nasty boy ;) Cheers ! > > Vince > > Robert -- Deux choses sont infinies : l'univers et la bóŐise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------ art_40336_10353328.1159393833651--