Dart is an open-source, general-purpose, class-based, object-oriented language with C-style syntax which can optionally transcompile into JavaScript. It is used to build mobile, desktop, and web applications. It supports various programming concepts like interfaces, classes, collections, generics, mixins, and optional typing. It was developed by Google and later approved as a standard by ECMA group. The original release of Dart was in November 2013.
Dart can be used to create single-page applications, which apply only to websites and web applications. Single-page applications enable navigation between screens of the website without loading a different webpage in the browser. A classic example is Gmail. In Gmail, when you click on a message in your inbox, browser stays on the same webpage, but JavaScript code hides the inbox and brings the message body on the screen.
Advantage of Dart
TypeScript is an open-source pure object-oriented programing language. It is a strongly typed superset of JavaScript which compiles to plain JavaScript. TypeScript is developed and maintained by Microsoft under the Apache 2 license. It is not directly run on the browser. It needs a compiler to compile and generate in JavaScript file. TypeScript source file is in ".ts" extension.
We can use Typescript for both server-side and client-side web applications. It is also used in the development of large-scale web applications. It adds support to the different features present in ECMAScript which is maintained by a TC39 committee of the ECMA group.
Anders Hejlsberg developed TypeScript. Its first version introduces to the public in the month of October 2012. After two years of internal development at Microsoft, the new version of TypeScript 0.9 was released in 2013. The current version of TypeScript is TypeScript 3.4.5 which was released on 24 April 2019.
Advantages of TypeScript
We can understand the main differences between TypeScript and Dart from the below table.
TypeScript | Dart | |
---|---|---|
Introduction | TypeScript is an open-source pure object-oriented programing language. It is a strongly typed superset of JavaScript which compiles to plain JavaScript. | Dart is an open-source, general-purpose, class-based, object-oriented language with C-style syntax which can optionally transcompile into JavaScript. |
Owned by | Microsoft | |
Created by | Anders Hejlsberg | Lars Bak and Kasper Lund |
First release | The first release of TypeScript is in October 2012. | The first release of Dart is in November 2013. |
License | Apache 2.0. | Barkley Software Distribution (BSD). |
Current version | The current version of TypeScript is 3.5.3 in July 2019. | The current version of Dart is 2.4 in June 2019. |
Design | It is a typed superset of JavaSript. | It is a full scripting language, not a superset of JavaSript. |
Operator overloading | It does not support operator overloading. | It supports operator overloading. |
Libraries | There is a moderate number of libraries available. | There is a higher number of libraries available as compare to TypeScript. |
Tooling Support | TypeScript supports the following tools:
|
Dart supports the following tools:
|
Build tools | It has its own build tool. | It supports all major JavaScript build tools (Browserify, Gulp, Grunt, Webpack, etc.) |