flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject [FlaconJX]Multiple constructors
Date Wed, 11 Nov 2015 11:02:48 GMT
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

Does anyone have better ideas?

View raw message