From: Dick Davies Date: 2006-06-06T18:40:01+09:00 Subject: Re: Speed of Ruby program != Speed of Ruby language (was Re: Zed and Luis drop the bomb on Ruby's poor performance) On 03/06/06, Phil Jackson wrote: > On Fri, Jun 02, 2006 at 07:56:10 +0900, Dave Howell wrote: > > The String class is not only nothing like a C string, it's not a string at > > all, in the sense that any/all other languages I've met use the term. > > This is the point you should just let this one go I think. Ruby is written > in C and the String object wraps one of these (as defined in ruby.h): > > struct RString { > struct RBasic basic; > long len; > char *ptr; > union { > long capa; > VALUE shared; > } aux; > }; > > What this boils down to is that a Ruby String *is* a C string with fancy > clothes on. That's the implementation. By that argument a Java XXX is just a C struct, because the JVM is written in C (actually C++, I think). Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/