Finding a "safety syntax" for classes

Kevin Smith khs4473 at gmail.com
Tue Mar 20 22:24:08 PDT 2012


>
> We can live quite nicely with treating class declaration like const
> declarations.  The name is logically hoisted so it is visible over the
> lexical scope, but the name is temporally dead until the class declaration
> is executed, in statement sequence, as an initializer.
>

This looks good to me.

Personally I think the answer should be "A" which implies that we have
> class-side inheritance.
>

I'm still trying to form an opinion on this.  Dart has no static method
inheritance.  In the spec, there's the following commentary:

*Inheritance of static methods has little utility in Dart. Static methods
cannot*
*be overridden. Any required static function can be obtained from its
declaring*
*library, and there is no need to bring it into scope via inheritance.
Experience*
*shows that developers are confused by the idea of inherited methods that
are not*
*instance methods*


I'd be interested to hear other viewpoints on the matter.

kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120321/4ef682a9/attachment.html>


More information about the es-discuss mailing list