Well, "real" static typing doesn't necessarily makes the programmer's job easier. It makes the *compiler/JIT*'s job easier. But I do agree with the point, I was expecting something more innovative, as ECMAScript is already going through the path of evolution, we need more languages that present revolutionary solutions for the problems in webdev.
On Thu, Oct 13, 2011 at 12:09 PM, Quildreen Motta <quil...@gmail.com> wrote:Well, "real" static typing doesn't necessarily makes the programmer's job easier. It makes the *compiler/JIT*'s job easier. But I do agree with the point, I was expecting something more innovative, as ECMAScript is already going through the path of evolution, we need more languages that present revolutionary solutions for the problems in webdev.Are we really saying things like the original poster's "things I like that aren't in Dart" list are really "revolutionary solutions for the problems in webdev"?
Dart isn't intended to be an experimental academic language.
2. immutable types
3. type inference
4. significant indentation (vs. a slurry of curly braces)
5. "real" static typing
3. type inference
Dynamic languages don't need type inference. :) Dart does have an optional type system but it's mostly a dynamic language.
Map<String, Dynamic> m = {
'one': new Partridge(),
'two': new TurtleDove()
};
is equivalent to:
Map<String, Dynamic> m = <Dynamic, Dynamic> {
'one': new Partridge(),
'two': new TurtleDove()
};
With type inference it could be equal to the more natural:
Map<String, Dynamic> m = <String, Bird> {
'one': new Partridge(),
'two': new TurtleDove()
};
Rémi
But maybe you meant m to be a list of Animals, and it's only a
coincidence that the initialization value only has Birds.
Sure, the compiler could guess, but than means that sometimes it'll be
wrong, and if you want zero warning, you'll have to declare types
explicitly in some cases but not always, depending on what the actual
initialization happens to be.
--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet
instead takes the well-trodden, and frequently loathed/discredited path.
Creating a new language is a precious opportunity to make programming easier/better/
more efficient.
> Another path is to make a language that's an improvement while being
> familiar enough to make that transition easier. Maybe the language won't be
> as amazing as it could hypothetically be, but more people will be
> comfortable using it.
I think another under-appreciated goal is the "from quick prototypes
to serious apps." There aren't many languages out there that are
designed to scale conceptually as well as practically. Javascript and
PHP are good examples of languages that are very approachable. It's
easy to add a bit of Javascript to a web page to get a bit of dynamic
behaviour on the client, and PHP is similarly easy to get going with
on the server side. The barrier to entry is incredibly low - just add
a special tag with a few lines of code and you're off. But as you
start doing more with the language, and the size of your team and code
base grows it becomes difficult to manage complexity in these
languages. It can be done, and there are some famous examples, but it
takes a lot of discipline and you end up fighting the language a lot.
On the other end of the continuum you have languages like Java, C# and
even Smalltalk. They're designed to be usable at scale by large teams
with large codebases and solving complex problems. They have features
that help manage that complexity, encourage communication between
developers, and allow kinds of tools that large projects need. But
these languages don't scale *down* very well, and they're not at all
approachable. Setting up a development environment is a lot of work
and involves a lot of moving parts. Deployment is even more difficult.
Most languages fall in between the two extremes, of course. What I
love about Dart is that it aims to be a language that truly scales on
this continuum. It won't be simple, and we're a long way of knowing if
they Dart team will be able to pull it off. But it's a really valuable
goal, and I think they've made some design choices in subtle ways that
we don't full appreciate yet.
Colin
4. significant indentation (vs. a slurry of curly braces)
Tangentially, code is written mostly to be read.
safer (immutability by default)
Dart looks interesting an promising. But to gain more attraction in a time where FP and immutability gets more and more attention (and JS indeed being somehow functional), it is absolutely disappointing to find in the samples code with bunches of void xxx () - methods communicating over member variables. Globals are out, even inside a class, where possible.
http://code.google.com/p/dart/source/browse/trunk/dart/samples/socket/SocketExample.dart