Arrays in Rev (long)

Ken Ray kray at sonsothunder.com
Mon Jul 12 03:09:37 EDT 2004


> > Director:
> >   set myList = ["Troy","Ken","Richard"]
> >   put getAt(myList, 2)
> >   --> Ken
> 
> Or in "modern dot-lingo" -
> put myList[2]

See, I TOLD you I was rusty! ;-)

> Very awesome dissertation. While Director's techniques for array 
> handling are probably the only reason that I perceive it as 
> lacking in 
> Transcript, this has certainly helped me to understand Rev's 
> under-the-hood approach to them. Adding CRs, and doing splits somehow 
> seems a bit less than straightforward, as you must then do mental 
> translation from string lines, etc. in order to develop appropriate 
> paths to data. Plus, every example you've shown is based on knowing 
> where the data is in the first place - it gets even more complex when 
> one must search within the array for data, and then do a relational 
> path to associated data, no? At some point, the advantages to 
> multi-dimensional arrays would seem to fall by the wayside, 
> overshadowed by array handling complexity.

True. But it really depends on what the data requires. I think where it
breaks down is the approach to applying the associativeness, which Director
does in a much cleaner way (although I must add, I can't tell you how many
hours I and other Director programmers under my supervision have spent
looking at large multidimensional lists trying to find the proverbial needle
in the haystack as to where their list went wrong - I'm sure you can
relate...)
 
> I DO hope that more advanced array handling gets included in a Rev 
> update (and soon.) In Director, it is second nature. In Rev, I'm not 
> sure that I'll use them in their current state, beyond simple flat 
> arrays. I plan to look at Mark and Dar's solutions to see how they 
> actually fill the gap. I think deep arrays and list handling have 
> become too intrinsic to my coding techniques to give up on them 
> altogether.

Understood - remember that you may be trying to apply Director techniques to
Rev data structures... some unlearning may be required to take advantage of
what Rev has to offer.

> Aside from all that, THANK YOU.

My pleasure!

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/




More information about the use-livecode mailing list