Subj : Re: Strange Rhino NativeString behavior To : Andy Madigan From : Brendan Eich Date : Mon Oct 25 2004 10:38 pm Andy Madigan wrote: > --- Matt McShane wrote: > >>In the meantime, if I were to try to hack a "no primitives" mode into >> >>Rhino (don't know how hard that would be - haven't even started >>looking) >>would anyone be interested in hearing about it? If so, I can do some >>of >>my thinking out loud here. If not, I'll do it and shut up. > > > I for one would be very interested in a "no primitives" mode, and I > have been wondering why JavaScript needed primitives in the first > place, the seem especially messy with Strings. Moreso for Rhino users than for SpiderMonkey users, because with Java you have to interface with String objects more often. With SM and the DOM, you can deal with primitive strings for ages without storing a property and wishing it persisted. > It seems one way to > implement this would be to change: > var a = "babble" from meaning a primitive string to meaning the > equivalent of > var a = new String("babble") That's implicit in any unification. /be .