«

»

Jan
21
2012

Why Dart Types Are Optional and Unsound. Part 2

Before we start: Code used in this article

We continue with the guys at Dart, in this short article will show the code that we use later in the following article, it’s some guys with a small hierarchy and some variables:


class Mammal {}

class Cow extends Mammal { String moo() => 'moo!'; }

class Pig extends Mammal { String oink() => 'oink!'; }

Mammal mammal = new Mammal();

Cow cow = new Cow();

Pig pig = new Pig();

Fuente: Dartlang

Permanent link to this article: http://www.dartexperience.com/en/2012/01/21/%c2%bfpor-que-los-tipos-en-dart-son-opcionales-y-poco-solidos-parte-2/

Leave a Reply

Your email address will not be published.


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>