valueDiff for arrays?

Mark Waddingham mark at livecode.com
Sat Aug 4 19:52:34 EDT 2018


On 2018-08-04 21:00, Richard Gaskin via use-livecode wrote:
> Mark Waddingham wrote:
> 
>> Yes - so come up with LCS handlers which do that, share them, let's
>> work together to make them as efficient in LCS as possible and then
>> see what we can do in the engine to improve their performance (which
>> I'm guessing is as much the purpose for the proposition as the
>> syntax).
> 
> It is, primarily.  The minor convenience is nice too, but you know how
> much I love to see performance enhancements in the engine.
> 
> As for implementation, Mark Wieder's looks good:
> http://lists.runrev.com/pipermail/use-livecode/2018-August/248862.html

One important point here (which I think is something which is often 
overlooked in LC as it is just something we deal with implicitly case by 
case)...

In your use-case for 'valueDiff' - do you need to tell the difference 
between a key value being the empty string and a key value not being 
present at all?

[ i.e. using an array key absence to emulate 'nothing': meaning you are 
actually storing nothing or a value (even the empty string). ]

It might seem like a minor detail, but does change the operation 
somewhat (and potential implementations).

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list