>> What’s the difference?

Also something I forgot you could be interested in, even though it doesn't 
matter for Vector.

var undefinedValue:* = undefined; // returns undefined
var undefinedObject:Object = undefined; // returns null

but

vector.push(undefined);
objects.push(undefined)

Both insert null as the type vector checking and conversion seems to be on 
Object.

So, at the end, it seems there are no differences in the usage, both are 
equivalent to Vector.<Object>, personally , I still use Vector.<*> when I've 
got no idea what it will go inside (uint, int, Object, ...) and use 
Vector.<Object> when I don't don't the subtype but it is a matter of style, it 
won't make any differences as far as I'm aware of.

Frédéric THOMAS


----------------------------------------
> From: [email protected]
> To: [email protected]
> Subject: RE: * vs Object
> Date: Fri, 12 Jun 2015 18:03:49 +0100
>
>> Vector.<*> seems to cause abc byte code issues. Compiler seems happier with 
>> Vector.<Object>.
>
> What code and what error do you get ?
>
>> What’s the difference?
>
> * stands for: undeterminated type
> Object for: Object and therefore its subclasses, so, given 1 instanceof 
> Object == true
>
> var vector:* = new Vector.<*>(); // will return a Vector.<*> even though 
> vector is typed *
> var objects:Vector.<Object> = new Vector.<Object>();
>
> vector.push(1);
> vector.push(new Object());
>
> objects.push(1);
> objects.push(new Object());
>
> both work.
>
> Frédéric THOMAS
>
>
> ----------------------------------------
>> From: [email protected]
>> Subject: * vs Object
>> Date: Fri, 12 Jun 2015 11:37:37 -0400
>> To: [email protected]
>>
>> Vector.<*> seems to cause abc byte code issues. Compiler seems happier with 
>> Vector.<Object>.
>> What’s the difference?
>>
>> Ciao,
>> Paul Hardiman
>>
>>
>>
>
                                          

Reply via email to