* Mystifier (Jan 14, 2005 18:40):
> > > About learning things before writing VM, I am sure I have to. What
> > > I feel No VM or Interpreter can exists with reasonable performance
> > > with have an immutable string class. It is altogether a different
> > > matter what you call them.

> Clarification: It says that immutable string class is necessary in VM
> because instead of comparing strings for method names etc in VM you
> can use integers or references comparison. Ruby also does same thing
> but for Unknown reasons prefers to call them symbol class and not an
> immutable string class. They want to deny that Ruby has any. I have
> found Symbol has all the ingredients of immutable string class. It has
> something more - uniqueness. 

Ruby doesn't have an immutable string class, that's final.  Ruby has a
Symbol class that is used for the specific ideas you're referring to, to
make certain implementation details faster and more memory efficient.
It has nothing to do with the other "merits" of having immutable
strings.

You can add strings, but you can't add symbols,
	nikolai


-- 
::: name: Nikolai Weibull    :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}