Livecode 10.0.0dp5 new reserved words

Mark Waddingham mark at livecode.com
Tue Jul 11 13:09:08 EDT 2023


On 2023-07-11 13:26, Mark Waddingham via use-livecode wrote:
> Anyway, we'll try and figure out what has changed to cause the change 
> in behavior - at the very least we can go back and add a 'breaking 
> change' warning to the release note for the change which caused the 
> issue.

Okay so after a bit of digging I can confirm that this is down to an 
unintended consequence of implementation constant expressions.

The behavior prior to that feature was:

You are allowed to assign and evaluate variables whose name is the same 
as property keywords which can only appear as object properties (i.e. 
require an OF afterwards) and are not also constant keywords ('left' and 
'right' I think are the only two which are object properties and 
constants).

Further, if explicitVariables is true then you cannot declare such 
variables, but you can evaluate them. (In this case, they would act as 
unquoted literals - you can still assign indirectly using do with 
explicitVars turned off at the time of the do).

The reason it was changed was to fix a problem with the constants 'left' 
and 'right' being used in constant initializer expressions - but at the 
expense of object only properties not being able to be variables. That 
problem needs to be resolved in a different way.

So this is a bug/regression - not so much because of the use of 'tExt' 
(text) but because scripts which use any object property keyword as a 
variable name will break. As many object property keywords are not 
dictionary words - but compounds or contractions - this means that even 
scripts which conform to the long standing rule could fall foul.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Build Amazing Things



More information about the use-livecode mailing list