On 10/14/06, slangeberg <[EMAIL PROTECTED]> wrote:
>Oddly, in AS3 Macrodobe have
taken out the facility to mark a constructor as anything else than
public

I think they're following the Java language closely, which only has public
constructors.

Hi Scott,
 No, Java does allow private/protected constructors - see the Java
language spec:
http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.6.1

It's very handy - both for abstract classes (although Java has the
abstract keyword, which helps!) and for singletons. Also for classes
which should only be generated through factory objects.

AS3 is following/defining ECMAScript rather than Java (but admittedly
the language is very Java-like).

I've no idea why Adobe have chosen to shut off support for non-public
constructors. But I've a vague memory of reading somewhere in Labs
that it was an oversight and might get put back in again. :-)

Ian
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to