Re: Array foreach in scripting languages

Alen Ladavac <[email protected]> Mon, 14 Aug 2006 22:45:37 +0200
Newsgroups gmane.games.devel.windows
Organization Croteam
Message-ID <[email protected]>
> The reason I'd like to have this work is that it is a
> recurring pattern in lots of code I see (iterating a
> list and deleting/inserting entries).

In my experience, rather than trying to get the "modification of the
list while walking it" right, it is much easier to instead just change
the algorithm slightly to work by rewriting the input list into an
output list. Simple and fool-proof. And for a scripting language,
it should be a very useable solution.

Cheers,
Alen


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=555