Tag Archive: Language

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/

Jan
16
2012

Why Dart Types Are Optional and Unsound. Part 1

Dart uses types in a way that might seem strange. Most popular languages that offer a type system use it very differently. If you’re familiar with types in Java, Haskell, Scala, or any statically typed language, you may wonder why on earth Dart makes the choices that it does.

Background: Dart is a dynamically typed language, and proud of it

Dart types are dynamic, as in LISP, Smalltalk, Python, and JavaScript. Users of languages ​​that also use dynamic typing, especially for programming JavaScript web certainlyunderstand the reason for this. If you prefer static typing in this article are not going to try to convince that it is better. For now we assume that Dart is a dynamically typed language.

In a dynamically typed language, any variable may be bound to a value of any type. Each value carries a tag identifying its type (or at least we can think of the implementation that way).

Dart adds some static typing, but it maintains the goal to have programmers take full advantage of its dynamic typing. The static type heuristics will not restrict them. (We talk about “type heuristics” because you really don’t want to think of it as a “type system”, not even an unsound type system.) So we want the static type checking to be optimistic: assume code is valid unless we can be statically sure it isn’t. This goal drives many of Dart’s decisions.

Source: Dartlang

Permanent link to this article: http://www.dartexperience.com/en/2012/01/16/%c2%bfpor-que-los-tipos-de-dart-son-opcionales-y-poco-solidos-parte-1-background-dart-es-un-lenguaje-con-tipos-dinamicos-y-orgulloso-de-serlo/

Jan
10
2012

Install Dart. Dart SDK for Windows

Every day is a step forward in this language, slowly but steadily and is now back with the theme of the facility, this time with a very good news. This is the SDK for Windows, no more building from source, now thanks to an executable can have our virtual machine to our Windows. (This together with the Eclipse IDE is already looking like a development environment)

To install our preferences entered eclipse IDE in the “launch” and where it says VMexecutable Dart choose our dart.exe

Permanent link to this article: http://www.dartexperience.com/en/2012/01/10/instalacion-dart-dart-sdk-para-windows/

Dec
17
2011

Draft Version 0.06 released

Changes since version 0.05:

7.5.1: Clari ed how initializing formals can act as optional parameters of generative constructors.
7.5.2: Treat factories as constructors, so type parameters are implicitly in scope.
8.3: Simplify rules for interface factory clauses. Use the keyword default instead of factory.
9: Mention that typedefs can have type parameters.
10.29: Added checked mode test that type arguments match generic type.
13.2: Added de finition of malformed types, and requirement on their handling in checked mode.

Permanent link to this article: http://www.dartexperience.com/en/2011/12/17/draft-version-0-06-released/