Why is it that AS3 does not support private constructors as
Private constructors are standard in most OOP languages (for
C++ and Java) and were supported in Actionscript 2. However,
not the case in AS3 which only allows its constructors to
'public' access modifier.
I have legacy code that I hope to migrate to the AS3
key elements of my code rely on design patterns like the
pattern which in turn depend on private constructors. I could
my code but, ultimately, I would lose the benefits of the
(ie. one and only one instance of the Singleton class).
I have also used private constructors to simulate enumerated
much like the enums you would find in Java 5 and up. But I
use the same implementation in AS3 without private
I do not want to resort to mixing legacy code with new AS3
keep functionality intact. Are there any possible
If not, are there any lobbying groups I need to know about so
we can get this feature back?
kglad, May 19, 2008 10:28 AM