Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6941703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:55:11+00:00 2026-05-27T12:55:11+00:00

http://www.dartlang.org/docs/spec/dartLangSpec.pdf The language spec for Dart mentions below Dart supports optional typing based on

  • 0

http://www.dartlang.org/docs/spec/dartLangSpec.pdf

The language spec for Dart mentions below

Dart supports optional typing based on interface types.
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 ..

  • Can someone elaborate further on the reason type system is unsound?
  • What was the Dart lang spec writers thinking when they say sound type rules for generics fly in the face of intuition?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:55:12+00:00Added an answer on May 27, 2026 at 12:55 pm

    What was the Dart lang spec writers thinking when they say sound type rules for generics fly in the face of intuition?

    Take a look at the related questions to the right of this one. I see:

    • Why is List<Number> not a sub-type of List<Object>?
    • Why generic interfaces are not co/contravariant by default?
    • Why can’t I assign a List<Derived> to a List<Base>?
    • Why cant I cast from a list<MyClass> to List<object>?
    • Why Animals[] animals = new Cat[5] compiles, but List<Animal> animals = new List<Cat>() does not?

    While covariance isn’t sound (for many mutable types), it is the behavior that many programmers intuitively expect when they first start working with generic types.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://www.grails.org/1.3.1+Release+Notes Improved Query Caching The findAll query method now supports taking advantage of the
http://www.postgresql.org/docs/8.4/static/functions-admin.html says: pg_relation_size accepts the OID or name of a table, index or toast
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html According to that article STL isn't suited for game-development. What are your thoughts
http://www.ubercart.org/docs/api/hook_add_to_cart I am trying to hook into the add cart functionality of ubercart. I
http://www.mongodb.org/display/DOCS/Dot+Notation+(Reaching+into+Objects ) In the docs, all the samples use dot notation to find a
http://www.elasticsearch.org/guide/reference/index-modules/analysis/standard-analyzer.html I have to use standard analyzer during indexing with custom stopwords . How
http://www.sqlite.org/threadsafe.html From above link I came to know, SQLite support three different threading modes
http://www.coffeeproteindrink.com/method-athlete/ I am trying to remove the open space below the main wrapper, in
http://www.validome.org/xml/validate/?lang=en&viewSourceCode=1&url=http://45143.com/finance-feed/abc.xml&onlyWellFormed=1 check the url above for validator results. Line 171 in the XSD is
http://www.boost.org/doc/libs/1_35_0/doc/html/boost/get_id405862.html template<typename U, typename T1, typename T2, ..., typename TN> U & get(variant<T1, T2,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.