Characters that can be used in an array key

Dar Scott dsc at swcp.com
Mon Apr 30 16:31:35 EDT 2012


On Apr 30, 2012, at 9:54 AM, Richard Gaskin wrote:

> While that article is still being finished, from what I've seen in Mark Waddingham's example code it seems that the only character we must avoid in array keys is NULL, since that's used internally as a delimiter between the key and the value.

I think this limitation is a feature we can do without.  I think most people have run across it and some not recognizing it have pulled their hair out.  

This will come up more as people explore unicode.  You will not see NULs in UTF-8 except for the actual original NUL.  You can use UTF-8 safely as a key.  However, someone might reasonably try some form of UTF-16 in which the NUL will show up as a ghost character.  

This also might come up with binary.  A person might try using the binary form of an identifier of some sort not realizing the zero bytes would cause trouble.  

I would support the removal of this feature and, in general, all special meanings of NUL in all of LiveCode.  (It can stay in legacy external interfaces.)

Dar






More information about the use-livecode mailing list