Never, ever use the name of a built-in property as a custom property

Bob Sneidar bobsneidar at iotecdigital.com
Mon Jan 28 11:02:22 EST 2019


This was addressed in my first Revolution conference. One of the classes was about naming conventions. Not only do you have to be careful about your names clashing with built-in names, but also reserved words, and the names used by OTHER developers (think plugins). 

Other languages partially address this by using variable scoping, but you still cannot use reserved words, like names of built in functions. Neither the SE or C/Java compiler would allow it, but properties are not variables per-se. 

The upshot of the class was that if you are producing something with public distribution in mind, preface ALL your variables and named objects in a way unique to you, so there can be no conflict. 

Bob S


> On Jan 27, 2019, at 15:10 , David Bovill via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Yes. I'm scared as well about naming things :) I'm not sure what is safe.
> Thee is a tension between making your code readable, and worrying that your
> use of a natural language term will clash with some evolution of the
> language that may later get added as a native feature. Is nothing safe?





More information about the use-livecode mailing list