Lists in Transcript

Andre Garzia soapdog at mac.com
Mon May 23 18:16:57 EDT 2005


On May 23, 2005, at 6:56 PM, Ruslan Zasukhin wrote:

>
> This is an object, like array you have.
> You can use it many times, you can modify it and so on.
>

Yes, you're of course right. One can modify the list() function and 
also create other helper functions so that he could add a list like 
datatype. I used to do this kind of thing out of lisp nostalgic 
feeling. if you put the result of list() into a chunk, you have a 
"object" and you can modify it...

not to mix this list() function with a real list rev implementation. I 
built this list() cantrip because "i am a lazy coder" sometimes, I 
usually am not in the mood to write all the lines needed to put a given 
number of items in a cr delim list, so that list() got two objectives:

	(a) make me write less. I usually say I hate coding, so I only write 
the lines I really need. :D
	(b) make my code more readable, it's easy to understand what's going 
on in the program when you see list("blue", "red", "yellow").

This function does not add any "new feature" or paradigm to Rev, it's 
simply a time saver. Now if you want a true list object, you can use 
chunks, then implement all the basic ops like add, remove, count and 
stuff. Having nice datatypes and using them wiselly is the real time 
saver.

Cheers
andre



-- 
Andre Alves Garzia ð 2004
Soap Dog Studios - BRAZIL
http://studio.soapdog.org



More information about the use-livecode mailing list