Here's an example from two of my languages (not C, C++ or Python) which
should illustrate what I mean.
In the easier of the two, you can write stuff like this:
b := "ABC"
c := "XYZ"
a := b + c
print a
Output is ABCXYZ. The other language is more low level, but it is used
to /implement/ the first one.
According to you, that means the low level language should also be able
to do that string concatenation.
Well, you're right. The trouble is that it would look like this (greatly
simplified to only deal with a combination of two strings):
varrec a,b,c
b.tagx := tstring ior hasrefmask
b.objptr := make_str("ABC",3)
c.tagx := tstring ior hasrefmask
c.objptr := make_str("XYZ",3)
a.tagx := tvoid
if b.tag = tstring and c.tag = tstring then
pc_ufree(&a) when a.hasref
a.objptr := add_stringobj(b.objptr, c.objptr)
a.tagx := tstring ior hasrefmask
fi
pch_print(&a,nil)
Do you see the difference?
--
bart