How do you implement generics like Vector. <T>?

So, ActionScript 3 has generics with the Vector (Vector.) Class. I have not seen another class that uses generics like this.

If you must implement Vector. yourself, how would you do that?

+5
source share
4 answers

If you are for generics, you better take a look at Haxe . It is very similar to ActionScript 3 and compiles in swc or swf.

+3
source

haxe ... generics haxe, as3. , , .. http://haxe.org/doc/flash/as3gen

+1

, , T , -   Foo (: *)

, Vector, excpetion, , , I, .

, , , , , , , , ++, , .

0
source

AS3 does not support generic class declarations. There is a good discussion here

0
source

All Articles