IFAIK, ActionScript does not have multiple constructors. I’m wondering if 
there’s any way to simulate multiple constructors when cross-compiling to js.

What prompted my questions is QName. QName has two different constructors. One 
takes a QName object, and the other takes uri and a localName. I was windering 
if there’s a way to get that effect with type-checking. The only way I can 
think of to support that would be to take a wildcard argument for the first 
argument (and do runtime checking) and make the second one optional.

Does anyone have better ideas?

Harbs

Reply via email to