> My point is that every time there's a new language (yes I've been
> around for awhile :) there are people complaining that it's unlike
> some other language (mostly an older one). It's understandable, but
> I also know that the people implementing the language spec's for the
> most parts is not inexperienced fools. There's in all properly a
> reason for the missing 'feature', and it just _might_ be that the
> language does in fact support the desired construct but in a
> different way than the one you are used to.  A new language is often
> more productive than the older one _overall_, but some specifics
> might become more tedious on account of the re-arrangement in
> complexity. You simply cannot progress and keep everything as is.
> This also applies for humans. 

Yes, this is certainly true in general. What I still don't get though
is how it applies to this specific topic. I still miss any reason why
permitting private constructors might have any undesirable side-
effects for AS 3 as a whole? And note that they are not only used for
singletons, I also use them for faking abstract classes in AS 2, and
since AS 3 still does not introduce this feature, it would be nice to
at least be able to "hide" the constructor with a private access
modifier (or rather protected in AS 3 I assume). Note that even the
APIs for Flash Player 8.5 use the concept of abstract classes, but
with a rather ugly workaround. From the docs for the DisplayObject
class:

DisplayObject is an abstract base class; therefore, you cannot call
DisplayObject directly. Invoking new DisplayObject() throws an
ArgumentError exception.

This does not feel right. This is something that should be enforced at
compile time. Either through making the class abstract or through
making the constructor inaccessible.

(Btw: Otherwise I think the new Display API is great)


Jens
www.oregano-server.org




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to