On Nov 18, 2011 1:14 PM, "Hans-Peter Diettrich" <drdiettri...@aol.com> wrote: > > > That's not easily feasable, as long as empty strings are implemented as Nil pointers. When reference counting etc. should be preserved, the additional information had to be moved into an static string descriptor, together with the pointer to the dynamic string content. And what about temporary strings, used in string expressions?
I was thinking that the type for this sort of thing would be done at compile time, not run time, but I suppose I expressed that quite poorly. > I don't think that an added "disposition" will improve anything, because its value has to be checked with every access to a string variable. With strictly typed strings (of fixed encoding) all checks can be performed at compile time. The idea was that instead of forcing strings to be one way (dynamically typed) or the other (fixed type), as defined by the compiler writers, that instead both behaviours be supported, and which is in play for a particular piece of code is decided by the developer. How that gets implemented cleanly could be anything, but I think it would have to be in the type declaration. Jeff.
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel