Forum ActionScript 3.0 Suggestion: Use vectors instead of arrays in SDK

Problems and discussions relating to ActionScript 3.0 here.

Suggestion: Use vectors instead of arrays in SDK

Postby robscherer123 » August 10th, 2018, 7:40 pm

Just a small thing, not really causing any issues but it'd feel a little cleaner and more correct. Plus vectors are a little faster performance wise. But that is, on the client side of the PlayerIO SDK in AS3 a lot of the methods return arrays in cases where it would make since to return a Vector. For instance the listRooms() returns an array containing RoomInfo objects, while it would make more sense to just return a Vector.<RoomInfo>() object instead. I believe the same goes for any calls to loading database objects. They could be Vector.<DatabaseObject>() instead. This would help catch any typing errors at compile time and just seems to make more sense.

Was just a small thought in case the Flash PlayerIO SDK is updated anytime in the near future.
robscherer123
Paid Member
 
Posts: 313
Joined: December 12th, 2012, 8:46 pm

Return to ActionScript 3.0