Private Constructors in AS3

I’m currently working on an AS3 Design Patterns book and just got done writing the Singleton chapter. For those of you that haven’t tried out AS3 yet, there are no private constructors. It seems to be a bit of a step back since AS2 had them. Sho Kuwamoto has a good explanation on his blog as to why they aren’t in AS3. The good news is that it sounds like Adobe wants to add it in the future, but there just isn’t enough time to get it done for this version. As nice as it would be to have private constructors in AS3 right away, I think there are enough other great features in AS3 to keep me busy until they are added. ;)

Leave a Reply

Your email address will not be published. Required fields are marked *