Giving the whole discussion about strings vs text and the future of API 2.0; I decided to stick using strings in my new projects.
I have no issues with encoding, or with the use of the new frameworks, and my code is fairly disciplined as to use only strings.
I discovered that literal strings are actual "TEXT" or "TextLiteral". This is super annoying because there are so many ways to end up with a value which is not explicitly declared as a string and you get TypeMismatchException left and right. Specially with auto, dictionaries, etc.
Is even worst having to assign to a str variable or force a cast to string with things like ( anEmptyStringVar + aValue )
Simple things like this:
if value = "jose" then ...
if value.toText = "Jose" then
if ctype(fnReturnStringAuto(),string).toText = "Jose" then
if fnReturnString().toText = "Jose" then
dim s as string if value = s + "Jose" then
I dont see how Xojo can harmonize STRING and TEXT so that we have a migration path that does not break the current projects. To fix this at some point they will have to break compatibility, or introduce yet another type.
Im really tired of all the casting/coercing (is worst than java) In my head I think is a best bet to stick with TEXT instead and start re-writting my code.