string sharing (possible bug?) [long]

Ranjan Bagchi ranjan.bagchi at pobox.com
Thu Dec 10 16:21:43 UTC 1998


Some questions about this:  does the ANSI standard have anything to say 
about the behavior of literals?  It's pretty well explained why things 
happen and why it's efficient that it happens, but is it correct?

Does the object generated by the compiler for a literal string need to have 
class == String?  Couldn't it be another object, perhaps referencing a 
literal array which implements copy-on-change semantics?

-rj





More information about the Squeak-dev mailing list