global problems

Jon jbondy at sover.net
Tue Aug 2 19:08:38 EDT 2005


I agree: it is unfortunate that the original language designers used the 
term "global" to mean "persistent global".  Had they separated the 
concept of scope from the concept of variable duration/lifetime, the 
language would have been equally powerful while being easier to understand.

Jon


Mark Wieder wrote:

>Jacque-
>
>Tuesday, August 2, 2005, 8:07:41 AM, you wrote:
>
>  
>
>>Globals are necessary when one has a suite of stacks that must interact
>>as a unit. One very common example is a "find" handler. Assume a number
>>of data stacks, each a clone of the others. A handler asks what you want
>>to find and puts that string into a global. The next time the user wants
>>to find something, you can use the same string to allow a persistent
>>search across many stacks.
>>    
>>
>
>Yes, I do understand what globals are and why one may want to use
>them. I do actually use them, albeit sparingly. My conceptual problem
>here is with the persistence of global variables in the IDE once the
>stack or suite of stacks that used them has been purged from memory.
>
>In your example, can you think of a reason for the "find" string to
>persist after you have closed the suite of stacks that initialized and
>used the find handler and you've gone on to work on another project?
>
>  
>



More information about the use-livecode mailing list