[Grace-core] Dart is our

Kim Bruce kim at cs.pomona.edu
Mon Oct 10 15:36:55 PDT 2011


One of the features that seems to be generating a lot of comments is that the type system for generics is intentionally broken, with covariant generics.  I haven't read the details, but it seems hard to justify unless they are thinking of types more as advice/documentation than as provable guarantees.  After all, Eiffel did this years ago and arguably has never recovered.

"The type system is unsound, due to the covariance of generic types. This is a deliberate choice (and undoubtedly controversial). Experience has shown that sound type rules for generics fly in the face of programmer intuition. It is easy for tools to provide a sound type analysis if they choose, which may be useful for tasks like refactoring."

Kim



On Oct 10, 2011, at 2:55 PM, James Noble wrote:

> Gilad's new Dart language is out: http://www.dartlang.org
> 
> I've added Background Papers/dartLangSpec.pdf to the repository
> 
> Dart is a class-based, single-inheritance, pure object-oriented
> programming lan- guage. Dart is optionally typed (13) and
> supports reified generics and interfaces. Dart programs may be
> statically checked. The static checker will report some
> violations of the type rules, but such violations do not abort
> compilation or preclude execution. Dart programs may be executed
> in one of two modes: production mode or checked mode. In
> production mode, static type annotations (13.1) have absolutely
> no effect on execution. In checked mode, assignments are
> dynamically checked, and certain violations of the type system
> raise exceptions at run time.
> _______________________________________________
> Grace-core mailing list
> Grace-core at cecs.pdx.edu
> https://mailhost.cecs.pdx.edu/mailman/listinfo/grace-core



More information about the Grace-core mailing list