Iterable SFSArray
Iterable SFSArray
Suggest making SFSArray's use java.lang.Iterable<T> interface so we can use foreach syntax on them.
Re: Iterable SFSArray
The problem I see with this is that the SFSArray, by definition, doesn't support a fixed T type. It can contain all sorts of typed data (19 different types actually)
An iterator would help but you would get a fixed wrapper type that handles bot the type and value of each element. This in turn means that inside your for...each loop you would still need quite a bit of conditional code to work with different types.
An iterator would help but you would get a fixed wrapper type that handles bot the type and value of each element. This in turn means that inside your for...each loop you would still need quite a bit of conditional code to work with different types.
Return to “2X Features Wish List”
Who is online
Users browsing this forum: No registered users and 41 guests