View Full Version : Collections - Any you have used in other languages you wished you had here?
CDHBookingEdge
11-08-2006, 08:52 PM
Are there any collection type classes that you have used in Java or C# or any of the other plethora of programming languages/frameworks that you wished you had available to you in AS3?
I'll admit this is a leading question, because then the discussion becomes "Are there ways to implement them using AS? And how would those classes be developed?"
Also being a newbie myself and many of us as well, we may not have a good concept of the collections provided by AS3 already so we might learn a thing or two about the already pre-existent collections available.
Thought I'd throw that out there for discussion,
Christopher
jsebrech
11-09-2006, 07:06 AM
Frankly, what I have needed from other languages I could reimplement quite quickly in AS. I've found that AS already provides most of what I need data structure wise in the guise of the array class. I need sets, but by using a variable as key and a boolean as value the array becomes a set (although admittedly the set arithmetic isn't all there). Most situations where I thought I needed iterators were generally solvable with the "for ... in" construction.
I did end up building my own generic Collection class with customizable always-enforced internal sorting, change events, and bi-directional iterators, but it ended up not being more than a few hundred lines of code. It is pretty silly that macromedia doesn't deliver a decent Collection class of this sort along with the flash IDE, but hey...
CDHBookingEdge
11-09-2006, 03:09 PM
"I could reimplement quite quickly in AS" yeah that's kind of why I asked. I thought it would be beneficial to ...maybe all of us and a good learning experience for some of us newbies. Maybe some ideas given maybe some of us newbies doing some as a group, maybe some just being QED.
Then at the end run of that some of the forum users will have a nice set of
collection classes to have in their toolkits. ;-)
And if the response I'm expecting from a question I asked Tink is what I think it will be then I'll be experiencing the same thing you did for bit arrays as far as keyed lists. Which just means more tools for the toolkit ;-)
Thanks again for your response and thanks for the info you've given on some other posts as well,
Christopher
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.