Hi --

On Mon, 21 Mar 2005, Glenn Parker wrote:

> Nikolai Weibull wrote:
>> * Glenn Parker (Mar 20, 2005 16:00):
>> 
>>>> Well, the problem is that a String is represented by one long
>>>> sequence of bytes in memory.
>> 
>>> AFAIK, that is not actually a requirement for a Ruby implementation.
>> 
>> What does that mean?  That is how it's implemented in Ruby.  There's no
>> definition of how Ruby should be implemented.
>
> Sure there is: a Ruby implementation should implement the Ruby language as 
> currently defined.  What I'm saying is that there is nothing in the 
> definition of the Ruby language that forces an implementor to use contiguous 
> blocks of memory for strings or arrays.  Managing large strings as linked 
> chunks is something text editors already do for performance.  Assertions 
> about how strings should or should not be used are based, in part, on 
> assumptions that should be questioned.
>
>> The implementation is the standard.
>
> I would rather say:
> The most widely used implementation is the de facto standard.  :)

I would say that Thing X is a Ruby implementation iff Matz says it is
:-)  In the absence of a written standard, there's no other real
benchmark -- except, perhaps, passing all tests in the Ruby test
suite, which I think anything claiming to be a full Ruby
implementation would clearly have to do.


David

-- 
David A. Black
dblack / wobblini.net