Larry Wall wrote:

> By the way, don't take this as a final design of string types either.  :-)



If string types are a tree of partially full nodes of string data, the
representation of each sNode could be independent of the others.

The originial idea behind using partially full nodes is, you can do
substitutions that affect the length in the middle without needing to
rewrite the whole thing.

But with variable string data types, each node can have a variable type.

Instead of redefining the whole thing from utf8 to utf16 when a chr(3852)
arrives (I have no idea how that looks from a data stream perspective,
but I am assuming that it is robustly defined) we can just redefine the
sNode that the big character lives in.

Also, to optimize most calls to eq (as well as all the other basic
comparison operators) an immediate data area defined in the SV structure
that is used for holding numeric data could hold, for pure string/raw data,
the first letter or two.

Reply via email to