Since all extensions will have to be recompiled anyway, I was wondering if any had given any thought to conventions regarding strings. Here are a few questions I'd like to have answered:
-Is null an acceptable return value? Will an extension ever be passed null? (I'm guessing the answer to the first question will answer the second.)
-If a string is passed to a function, can that function modify it? I would imagine that this would be a bad thing to do but that really depends on the answer to my next question.
-If a function is returning a string, should it ever return a pointer to one of its internal strings? SHould it always return a copy?
These are a few things that bothered me in previous extensions. I know that MMF never used null strings, but I know that a few 3EE extensions did return them, which could cause other extensions (that were not expecting nulls) to crash.
I also saw another scenario where the Associative Array object would return a pointer to one of its interanl strings and then a function in another object (String Manipulator maybe) would modify that string directly, causing AssArray to exhibit odd behavior.
I would just like to avoid these scenarios in MMF2 if at all possible. Conventions on these sorts of things would be nice.