Skip to main content

The Dart Team Welcomes TypeScript

It must be something in the water. Gilad Bracha and Lars Bak announced Dart in Aarhus, Denmark about a year ago as a “new programming language for structured web programming”. Yesterday, Anders Hejlsberg, once again in Aarhus, Denmark, announced Microsoft’s new programming language, TypeScript, “a language for application-scale JavaScript development”. Obviously, there’s something about the water in Aarhus that causes language designers to want to tackle the problem of large scale web development. Perhaps that’s why we chose to put the dart2js team in Aarhus full time!

Now that we’ve had a chance to take a look at TypeScript, the Dart team would like to welcome the TypeScript team to the neighborhood. If you already have a large JavaScript codebase, and if you already use Visual Studio, we think that TypeScript could be a great addition to your project.

A year ago, JavaScript programmers would frequently ask us why we needed a new programming language for the web. We argued that developing large web applications was hard, and that optional static type annotations could help. We also argued that the web needed better tooling support. We think that TypeScript has validated both of these statements. Going forward, I think the Dart project and TypeScript will learn a lot from each other.

A lot of people have been wondering what this means for Dart. The fact is, we’re more excited than ever! By making a break from certain parts of JavaScript’s syntax and semantics, we’ve eradicated large classes of bugs caused by various JavaScript gotchas. Nonetheless, last week, the Dart team released its own approach to using JavaScript in Dart apps, and our ongoing work with Web Components and isolates is finally delivering on the long hoped-for dream of encapsulation in the browser.

We’re even more enthusiastic about our plans to go beyond what JavaScript can do natively. Even though Dart can be compiled to JavaScript, Dart’s virtual machine opens up entirely new possibilities. For instance, our early testing with a feature called snapshotting allows Dart apps to start up 10 times faster than normal JavaScript. We also think that Dart is going to be a great fit for mobile. Finally, although V8 performs amazingly well in various JavaScript benchmarks, the Dart VM is already beating it in some of our internal benchmarks.

So once again, we’d like to welcome TypeScript. We think the web has suffered from too little choice for too long, and we think that the future of large-scale web development is looking brighter than ever!

Comments

  1. TypeScript compiler runs on Node.JS which is based on V8 and Dart reminds me to good old Hejlsberg Delphi.

    I see only good things in both project and I whish good luck to both projects.

    Maybe Dart team can simplify Dart2JS development If will generate TypeScript instead JavaScript?

    ReplyDelete
  2. Hi Google and Santa Clause,
    here is what we really want:
    please add optional type annotations to Traceur, adjust the Dart Eclipse Plugin to work with Traceur, and provide a Google Appengine Runtime for that !

    My message to Douglas Crockford and the ES6 Standards Team:

    Microsoft and Google add >>optional<< Typing to their tools, Adobe had that already for years, why could ES6 not have type annotations also ?

    Just wondering .....






    ReplyDelete
  3. web programming allows you to create dynamic and interactive websites

    ReplyDelete
  4. TypeSafe makes Dart's success more likely. With TypeSafe, Microsoft can no longer criticize or block efforts to break the JavaScript browser language monopoly.

    To compete with Dart, Microsoft must work toward opening the browser to scripting language choice. But TypeSafe has practically no chance of success. Microsoft has proven repeatedly that it's incapable of creating a cross-platform standard (think VBScript, XPS, Silverlight, .NET).

    Once browsers allow scripting language choice, Dart is the obvious choice.

    ReplyDelete
    Replies
    1. Well first of all it's TypeScript not TypeSafe. Secondly TS creates standard JS, so this is NOT a new language or proprietary anything. Its really just a tool to help you create better JS. Its not TS that has to compete - all browsers already support it. If anything its dart that has to compete. Just because it's Microsoft doesn't always means its crap and allows you to fanboi troll.

      Delete
    2. "Microsoft has proven repeatedly that it's incapable of creating a cross platform standard".

      That's not entirely true. They created the SOAP, CLR, and Rich Text Document (RTF) and inadvertently...Word .doc format.

      Delete
    3. compare SOAP with REST. RTF vs PDF/ODF. I'm not entirely sure if these Microsoft Formats can be called 'successfull' standards...

      Delete
    4. @vi4m REST is not a standard, SOAP Web Services are, so you are not comparing like with like.
      @DevDanke Technologies like VBScript and .NET were never intended to be cross platform, they were created for the benefit of Windows developers exclusively.
      For some reason facts don't seem to matter to Microsoft haters.

      Delete
  5. What does TypeScript have to do with needing to pick a language in a script tag, or being cross platform? It's JavaScript, it works anywhere JavaScript does.

    ReplyDelete
    Replies
    1. TypeScript is a superset of JavaScript, thus it has to be compiled to plain JS before running. However, it can be done automatically using https://github.com/niutech/typescript-compile - you just embed your TS in <script type="text/typescript"></script> tags.

      Delete
  6. ActionScript (supposedly) implements ECMA standard. It has classes and types from 2.0 which is old as hell (and doesn't even have RegExp support). So what's the problem really? Browser vendors - just give us the feckin' classes! And types too. Other browser vendor will eventually follow just push it forward for god sake! Don't have to re-event the wheel again - just use syntax from e.g. C++ on top of current JavaScript so that standard JS just work.

    First version don't have to have lambda and stuff. Classes, private, public, inheritance is fine for the first builds. For me at least. Browser vendors could support types by simply ignoring them or by showing a notice for most obvious place. DEVELOPERS JUST NEED TO BE ABLE TO START USING THIS. Not write yet another feckin' compiler or library.

    ReplyDelete
    Replies
    1. Sorry for the rant (above) I guess I was looking at a one too many class-framework ;-). I also didn't realize Google was activly working on ES6 features (including classes and modules). I feel it's a better aproach to make the language evolve and use new stuff as they appear. Appologies for shouting especially that this was probably not in the right direction.

      Delete
  7. Here are my top 10 reasons why TypeScript will be widely adopted: http://www.pursuitofgreatdesign.com/2012/10/top-10-reasons-why-typescript-will-be.html

    ReplyDelete
  8. I feel TypeScript's syntax is much more familiar to me and makes me exciting. TS's static typing allows code editor's to provide much better code completion ( I think it's a key to productivity).

    And speaking of productivity, I'm making a live html/css/js code editor with a Firebug-like UI for tweaking css styles in real-time:

    http://liveditor.com.

    ReplyDelete
  9. Make it the fastest and best LOB language for the web and tell us that Google is 100% committed and wont abandon this project, unlike what Microsoft did to Silverlight.

    The enterprise and web LOB developers mostly don't mind if it is compatible to other platform or device, as long as our user has great UI experience and fast data extraction Dart will have a brighter future ^_^y

    ReplyDelete

Post a Comment

Popular posts from this blog

Const, Static, Final, Oh my!

Posted by Seth Ladd

(This is an "oldie but a goodie" misc@dartlang.org post originally written by Bob Nystrom. It is being posted here as the explanations still ring true.)

Bob writes:


"static", "final", and "const" mean entirely distinct things in Dart:

"static" means a member is available on the class itself instead of on instances of the class. That's all it means, and it isn't used for anything else. static modifies *members*.

"final" means single-assignment: a final variable or field *must* have an initializer. Once assigned a value, a final variable's value cannot be changed. final modifies *variables*.

"const" has a meaning that's a bit more complex and subtle in Dart. const modifies *values*. You can use it when creating collections, like const [1, 2, 3], and when constructing objects (instead of new) like const Point(2, 3). Here, const means that the object's entire deep state can be determ…

The new AdWords UI uses Dart — we asked why

Google just announced a re-designed AdWords experience. In case you’re not familiar with AdWords: businesses use it to advertise on google.com and partner websites. Advertising makes up majority of Google’s revenue, so when Google decides to completely redo the customer-facing front end to it, it’s a big deal. The Dart team is proud to say that this new front end is built with Dart and Angular 2. Whenever you asked us whether Google is ‘even using Dart for anything,’ this is what we had in mind but couldn’t say aloud. Until now. We asked Joshy Joseph, the primary technical lead on the project, some questions. Joshy is focusing on things like infrastructure, application latency and development velocity, so he’s the right person to ask about Dart.Q: What exactly did we launch on Monday?It’s a complete redesign of the AdWords customer experience that is rolling out slowly as a test to a small initial set of advertisers. The most noticeable thing is probably the Material Design look and f…

Dart 1.12 Released, with Null-Aware Operators and more

Dart 1.12.0 is now released! It contains the new null-aware operators language feature, and enhancements to pub, Observatory, dartdoc, and much more.

Null-aware operators

The new null-aware operators help you reduce the amount of code required to work with references that are potentially null. This feature is a collection of syntactic sugar for traversing (potentially null) object calls, conditionally setting a variable, and evaluating two (potentially null) expressions.

Click or tap the red Run button below to see them in action.

??

  if null operator. `expr1 ?? expr2` evaluates to `expr1` if not `null`, otherwise `expr2`.


??=

  null-aware assignment. `v ??= expr` causes `v` to be assigned `expr` only if `v` is `null`.

x?.p

  null-aware access. `x?.p` evaluates to `x.p` if `x` is not `null`, otherwise evaluates to `null`.

x?.m()

  null-aware method invocation. `x?.m()` invokes `m` only if `x` is not `null`.

Learn more about Dart's null-aware operators in our Language Tour.

.packages fi…