[albatross-users] more data tricks for the wiki

Gregory Bond gnb at itga.com.au
Thu Jul 3 11:44:23 EST 2003


 
> <al-for iter="item" expr="list">
> 
> where list is the list of sets and item is a single element from the list.

No, better to think of it as: item is a ListIterator object, item.value() is
a (reference to a) single element from the list.  

Which implies "item" is not a great name for the iterator in an al-for loop!

(And it is a real reference to the actual object, too, so you can do things
like "item.value().use_count += 1" and it will do the Right Thing.)

Personally, I don't find "i.value().field" to be much of a problem, but that 
may be because I grew up doing pointer arithmetic in C.





More information about the Albatross-users mailing list