Hi, All,
I started to learn Flex and ActionScript and encountered interesting statement: untyped variable. That is:
var x:*;
or just
var x;
I found out that they can hold undefined values. Variables of Object type cannot. But I don't understand the purport of them. I don't think that someone often need to distinguish undefined and null value - that is possible with these variables. Though it seemed to be equally possible in ActionScript 2 with no untyped variables. Variable x was treated like Object in statement var x; and Object variables could carry undefined value.
So what is the rationale of these "truly untyped" variables? Why are they introduced into the language?