Is dart for JavaScript developers

Matthias Sch├╝tz - Web design / web development / AngularJS / Photoshop / TYPO3

201114Oct

Dart: Structured web programming with Google

It is no longer a secret that Google is developing its own alternative scripting language to JavaScript. In the meantime, there is also a website for the "Dart" project where interested parties can find out more about the client-side language. Under the motto "Structured web programming", Google offers a modern scripting language which, similar to JavaScript ++, offers object-oriented possibilities: These include classes, interfaces, polymorphism and much more. Dart projects can either be translated into JavaScript with a converter or executed in a Chromium environment (also via VM).

A darts project is primarily characterized by classes and a structure associated with them. The aim of the project, which is still in the development stage, would be such an integration into HTML documents:

  • <html>
  • <body>
  • <script type="application/dart">
  • class point {
  • var x, y;
  • Point (this.x, this.y);
  • scale (factor) => new Point (x * factor, y * factor);
  • distance () => Math.sqrt (x * x + y * y);
  • }
  •  
  • main () {
  • var a = new Point (2,3) .scale (10);
  • print (a.distance ());
  • }
  • </script>
  • </body>
  • </html>

More information about darts can be found in the overview and in the code examples.