By Lars Bak, Software Engineer, Dart Team
Cross-posted on the Chromium Blog
Today we are introducing an early preview of Dart, a class-based optionally typed programming language for building web applications. Dart’s design goals are:
- Create a structured yet flexible language for web programming.
- Make Dart feel familiar and natural to programmers and thus easy to learn.
- Ensure that Dart delivers high performance on all modern web browsers and environments ranging from small handheld devices to server-side execution.
Dart code can be executed in two different ways: either on a native virtual machine or on top of a JavaScript engine by using a compiler that translates Dart code to JavaScript. This means you can write a web application in Dart and have it compiled and run on any modern browser. The Dart VM is not currently integrated in Chrome but we plan to explore this option.
The language comes with a set of basic libraries and tools for checking, compiling, and running Dart code, all of which will evolve further with your participation. We've made the language and preliminary tools available as open source on dartlang.org. Check out the site to give feedback, learn more about Dart, and participate in its development.
We look forward to rapidly evolving Dart into a solid platform for structured web programming.
Lars Bak is a veteran virtual machinist, leaving marks on several software systems: Beta, Self, Strongtalk, Sun's HotSpot and CLDC HI, OOVM Smalltalk, and V8.
Posted by Scott Knaster, Editor
Looking forward to it. Loved the OO concept and compiling it to pure JavaScript.
ReplyDeleteMy wish: Integrate a cut-down CLR (e.g. parts of Mono) into the browser. Then we could choose which language we use to develop for the client side.
ReplyDeletewhat are the prerequisites to learn this
ReplyDeleteWhy is dart relevant when there already is javascript ? Is it like an option thing ? What does it provide that Javascript doesn't ? The class-based object oriented design when compared to javascript prototype based object oriented design ? Can someone please explain ... thanks
ReplyDeleteIt's easier for developer to write in it and have it converted to JavaScript. You can also use it for server code as well. This means that you can reuse code throughout you application. It also provides things that JavaScript doesn't like functions and being able to declare types.
DeleteGreat something new to try.
ReplyDeleteStrange that we see again a new language from google. From my point of view mono is the best choice to run on browser site if it possible...
ReplyDeleteHi Dart Team,
ReplyDeleteis Dart in any way related to Google's Closure Tools? Are you using the Closure Compiler to produce your JavaScript?
Thanks,
Jan
This comment has been removed by the author.
ReplyDeletelooking forward to work with it
ReplyDeleteCompeting standards
ReplyDeletehttp://xkcd.com/927/
Now if we could drop those ugly semi-colons :-)
ReplyDeletehttp://glaforge.appspot.com/article/google-announces-dart-new-language-for-the-web
is there a flag we can turn on to see the dart demo in chrome canary build?
ReplyDeleteI hope they'll get rid of the semi-colons at the end, a la Coffeescript. So annoying, if Ruby can do it, why not this?
ReplyDelete@Rik: it is called "Silverlight", and we all know how it ended up :)
ReplyDeleteNothing for Opera browser? :sad:
ReplyDeleteWhat about the DOM ? how is it gonna bypass javascript limits ?
ReplyDeleteWorks nicely in Opera Next (aka Opera 12)
ReplyDeleteSo if I can run Dart as a Javascript compiled code, why shouldn't I just write native Javascript? Or Coffeescript?
ReplyDeleteWe already have a new JavaScript language, it's called ecma.next!
ReplyDeleteWhat would be great would be to create a language plugin feature that would make it easy to port existing languages to compile to V8 bytecode, like Clojure, Scala do on the JVM.
ReplyDeleteI was being sarcastic, but seriously, coffeescript is looking like a real contender, succinct and powerful. I'd like to see the same syntactic sugar that coffeescript brings while maintaining the dynamism that javascript has.
ReplyDeleteFrom what I have seen, I'm not sure Dart is bold enough!
ReplyDeleteJust adding a class-construct (reserved word in EcmaScript) and typing the language feels like such a waste. Using Dart will not empower the developer to use newer Paradigms, and if a ci server with unit tests is in place shurely does not add much security. I really like the idea of a modern frontend language, but don't think a mere evolution will cut the deal.
- Where are Feature-Oriented concepts?
- I really am missing makro processing for internal DSL's
- Shouldn't there be a event system build into the languages core?
node.js
ReplyDelete@ot Silverlight is a plug-in which does its own thing. What I'm talking about is hosting a CLR and letting us work with CLR-targetting languages in the same way as we do with JS, i.e. operating on the DOM and source or being written within or referenced HTML - and the possibility of referencing IL, so you could use whatever language you liked and compile it to IL, freeing up the developer (and also saving a little time on the client, as there's only the IL->native step to perform).
ReplyDeleteThe JVM is a bad idea because, well, Oracle are being a pain about it, as expected.
nice to see the language open source right off the bat..
ReplyDeleteto all those eho believe that it is not feature rich and lacks something that they believe the language should have, please help by contributing to the project and improve upon it. that is the point of open source after all.
my best wishes to the dart team, lets see how dart evolves..
Sounds like HD Photo or WebP... too little too late.
ReplyDeleteInstead of creating yet another language, Google should have just concentrated on getting existing JavaScript development experience better.
If I wanted to go through yet another intermediate translation layer, I would have chosen CoffeeScript already.
How does it compare with Ocsigen?
ReplyDeletehttp://ocsigen.org
If Dart can be compiled into Javascript why wouldn't I just write the code in JS in the first place?
ReplyDeleteHi Lars,
ReplyDeleteAs we're already terminating each line with an unescaped carriage return, what is the purpose of the semicolons?
As we're already marking blocks by indentation, what is the purpose of the braces?
Perhaps it might be better to remove these redundant elements like other, modern web languages, ie, coffeescript. This means programmers wouldnt have to chase missing semicolons, or worry about code that executes differently from it looks.
Thanks,
Mike
Just looking at the example it looks like a very poor project and bad idea.
ReplyDeleteWhy would I want a new language if I have to write like and ancient one.
main
print 'Why do I need more than this to work properly?'
end
ClojureScript, ParenScript, CoffeeScript... and now Dart?
ReplyDeleteIt is indeed better to have a standard language runtime/VM in the web browser, and let the developers choose whichever language they like, rather than force them to learn quirks of yet another JavaScript-like language.
ClojureScript is a better choice now. It works, it is the same (nice) language as Clojure, so it is easier to target web and desktop platforms at once with Clojure.
+1 Standardize on a decent VM (any JavaScript one does not cut it) and let me program in my favorite language.
DeleteI'll be very interested to see how this pans out.
ReplyDeleteInteresting that so many developers dislike semicolons. When your page is 500+ lines those colones can help break up the page. Also it seems that for those of you new to JS that you are forgetting how easy it is to do JavaScript Code-Bloat.
ReplyDeleteYour page becomes huge unyielding to even simple attempts to debug. No for sure a common language that can compile down to JS is very cool.
I'm an application Architect for a fortune 5 company and can tell you all this is pretty cool stuff...
Shame its only going to work in a few browsers, making it pointless.
ReplyDeleteI would like to see an article explaing why use Dart instead of CoffeeScript, for instance. After all, CoffeeScript also supports class constructors. So, what else is supported by Dart that is not supported by CoffeeScript?
ReplyDeleteSmells like Java ... I have several questions:
ReplyDelete1. Looks like the type system is not going very far ... have you even considered using it to rid us of null pointers? Doesn't look like it.
2. Are there any new functional programming-style constructs? Mozilla's latest Javascripts have had array comprehensions and generators. Instead here we get those abominable Java/C++ style iterators ...
All in all this really has a 90s feel to it.
Great!
ReplyDeleteLooks like ECMAScript 6 -- http://www.infoworld.com/d/application-development/javascript-upgrade-feature-modularization-174251 -- can take a hint or two in its design. Large systems cannot be manageably programmed without some sort of a class concept.
This page crashes Safari. Not a good first impression... :(
ReplyDeleteThe JVM thingy aside, what does Dart do that GWT does not?
ReplyDeleteI don't get it.
Google, Y U NO re-use purty Go language syntax?
ReplyDeleteI read comments about node.js, CoffeScript, Ocsigen…
ReplyDeleteAnd what about OPA?
OPA is a strong typed language that produce a checked and optimized JS.
But it also takes care of all the server side and client/server communication!
Check http://opalang.org
This is not enough paradigm shift for me over existing JavaScript (in fact, it feels like a step backwards). CoffeeScript, however, is pushing the envelope.
ReplyDeleteWhat we really need is a language that pulls in the DOM-ease of jQuery, the data-binding ease of KnockoutJS, and the syntactical sugar of CoffeeScript.
Element element = document.getElementById('message')
ReplyDeleteThis makes me wince. 2001 just called! Firstly, no DOM-query capability like Jquery. Secondly, no Type inference! Go, C++0x and D all have it today!
It looks like Dart found a perfect balance between Java and JavaScript, simplyfing JS yet making it easier and more maintainable to build larger web apps, with IDE tooling.
ReplyDeletePretty exciting news, reminds me of Java launch (which looked so close to C++ to many initially)!
Why does everything have to look like fu**ing java? Why those semicolons? Why braces?? We need a world without braces!!!
ReplyDeleteAnyway, if Dart turns out to be a good language (and an efficient vm, which I'm sure it's guaranteed by Bak and Co), there will be other new Coffeescript-like transpilers targeting it.
Oh look, Ma.
ReplyDeleteIt's Actionscript 2.0 for Javascript, 8 years later...
Is dis d future language 4 Android???
ReplyDeleteExciting !!
ReplyDeleteAikido was released by Sun in 2003 - and everyone promptly ignored it. Classes, optional semicolons, closures, interfaces, etc. Maybe this will have better luck.
ReplyDeleteVery good, when this language will published?
ReplyDeleteReally? The 80's just called and they want their curly braces and semi-colons back.
ReplyDeletecould you make dart compiled binary and make it harder to extract source code from the browser than it is from js?
ReplyDeletejs encryption or obfuscation fails to protect code and making games or other valuable applications on the web with html5+js..feels like opensource. good luck
Nice :)
ReplyDeleteWhen Sun created Java, they decided to make it look like C and C++.
ReplyDeleteWhen Netscape created Javascript, they decided to make it look like Java.
When Microsof created C#, they decided to make it look like Java too.
PHP was created so it looked like, again, all of the above...
Enter Google, and created Go! Which looks like... yeah, you know.
But now, finally, Google decided to break new ground and created Dart!!!!
Do you know how it looks...?
Lovit :D
ReplyDeleteYeah!!! If Dart has great performance I'll use it for future my projects. Really smells like Java, thats cool thing ^.^
ReplyDeleteAnyone who has worked on a medium to large scale web app, with thousands of lines of JavaScript code, will understand just how great the new Dart language is. It feels to me like those who argue that they'd rather write pure JavaScript code, since that's what Dart compiles down to currently, would be able to better understand how great Dart is if they were to work on a large scale JavaScript project for a long period of time. Trust me, Dart is here to stay.
ReplyDeleteGoing to start teaching myself! Thank you Google
ReplyDeleteuh cant say im exactly impressed with this, have always had a hatred for js. First it gets put into html5, and now dart. i would rather an overhaul of php, or rewrite c++ for the web, no not java(aka resource hog). On another note leave the semicolons alone, they work well and define the end far better then whitespace.
ReplyDeleteforkin' the community is how we roll, now.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI'm digging it. I think you have a winner!
ReplyDeleteThere's unsound data types. Those new languages are too "modern" and messed. Operator overloading? Cmon!
ReplyDeleteWe need a typed and tool friendly JavaScript (or you can copy Java and change it's name).
Anything out of this line will not have my attention for more than some few moments and I hope not yours too.
The idea to replace JS is great.
ReplyDeleteDartSyntax and the thread-concept looks for me good.
An other idea is:
Why don't you take Groovy or only the Groovy-Syntax.
If you plan to integrate Dart in Browser, may be you must provide also a fastLoadingVM or alternativly a fast interpreter.
Hope you bring an Eclipse plugin with great DART support and type-ahead (intellisense). Won't make headstands to try the current version and install VS and depot_tools on Windows.
ReplyDeleteGood luck, this language looks promising... a little bit like loving Java :D
yuk coba gan
ReplyDeleteGreat i respect your thoughts . I think it can work on any platform . Thanks for sharing it
ReplyDeleteCould you provide a service like this, that would make it easier to start out using dart.
ReplyDelete<script type="text/javascript" src="dart2js.dartlang.org?dartsrc=www.example.com/dartscript.dart"></script>
This comment has been removed by the author.
ReplyDeleteIntention is good but I seriously doubt to replace JavaScript just because of its monopoly, it has very deep root.
ReplyDeleteThanks
Javin
10 example of grep command in unix
the language itself (syntax, ugly semicolon, etc.) is not that appealing ... but i'd loved to see an example of how the language construct itself may help to speed up web app launch time and execution speed.
ReplyDeleteSo, are you guys going to invent a new language a year?
ReplyDeleteMy take
ReplyDeletehttp://enterprise-strategy-architecture.blogspot.com/2011/10/dart-overview-of-googles-new-web.html
All those complainers about "Why wouldn't I just write JavaScript in the first place" must be ignorant to the commonly perceived deficiencies of JavaScript. The language itself is complex and convoluted, whereas things like CoffeeScript and *supposedly* Dart fill the need for developers to perform more object-based development. Also, until browsers start accepting alternatives to JavaScript natively, what other option is there to compile code into JavaScript??? The fact that they are going to provide a VM is at least taking things a step further to solve a blaring issue.
ReplyDeleteHater's gonna hate. Go Google!
One of Google's hallmarks is not invent something that has already been invented. Mostly, by focusing scarce resources on unexplored or under-explored areas of computing. Based on what is outlined, DART does not appear to live up to this standard. However, I will reserve judgement until I get to play with it.
ReplyDeletelooking forward to code something big!
ReplyDeleteI don't think the world needs another language. It would be better if Google first finished what it has started -- assign some adult supervision to the Google Docs scripting language and elevate it from the childrens' hobby shop that it now is. For example, ensure that anything that the spreadsheet user can do through the UI can also be done via a script. Right now, a script cannot even copy and paste a row.
ReplyDeleteWhy waste time to make it runnable "on top of a JavaScript engine"? Javascript is clearly a gone platform so Dart should have clean separation from it to unleash its full potential.
ReplyDelete@EricBerry
ReplyDeleteLike all languages, JavaScript may have a few warts but people (Java devs in particular) have a bad habit of confusing language design tradeoffs for doing things "the wrong way."
I really can't help but get the sense that Google culture doesn't allow JS expertise to amount to anything other than a 'nice plus' on an engineer's resume, which might explain why Closure's JS library was so incredibly lame (not to mention Java-centric) or why they still haven't figured out how to get tens of thousands of lines in Google Apps spreadsheets without crashing the browser.
If JS is such a clumsy, messy, awful language, why do JS devs tend to eschew IDE bloat in favor of just coding in consoles and color-coded text editors. And do you really believe that every single serious JS-focused but otherwise multilingual dev out there wouldn't immediately reach for Eclipse classic the second we had to write so much as a "Hello World" with big J's paradigm-locked cruft?
Try becoming an expert at JS before bypassing it. Performance isn't it's chief asset, flexibility is. That's a tradeoff (and less of one due to much-appreciated JITs like Google's V8), not a language flaw.
A functional, dynamically typed, highly event-focused language is a strong choice for the sorts of stateless http and multi-platform problems JS has traditionally had to confront.
It's origins are undoubtedly goofy but Brendan Eich knew what he was doing when he opted to model it after Scheme, a functional language, and it did not become entrenched as the web's only client-side scripting language because client-side focused web developers simply don't know any better.
JS's greatest strength is that it let's you establish your own app-appropriate paradigm even if that paradigm of choice is a clumsy woefully non-portable, non-modular, performance-murdering, illegible, specifically hated-on by the GoF patterns book as an antipattern class-cascade-inheriting waterfall model if you're just not comfortable architecting an app without a generous fist of ham to go with it. As a developer who's been exposed to C#, PHP, Python and yes I've even tinkered a bit with assembly, I am much more at home with C++ than I am with Java.
The name DART stand for ...?
ReplyDeleteThis is a great post, I favorited your blog and added your feed.
ReplyDeleteiPhone softwareudvikling
looking forward to working something cool. here is forums to get together and share dart each other.
ReplyDeleteDart Programming forums: http://coderbin.com/dart/
I love the structure provided in there. Need to explore the inter-class (or widget if you will) communication aspects.
ReplyDeleteGood show Lars.
Ajay
it makes no sense ,if it does not overcome existing pitfalls. hope DART overcomes most of the existing complexities.
ReplyDeleteIt's the same thing PYJAMAS does with python.. Compile Python code into javascript
ReplyDeleteCan this replace conventional JavaScript?
ReplyDeleteWhy C syntax? Horrible. For a new language you should make the syntax look like Python or Scala. Everything else you can fix afterwards but not the syntax.
ReplyDeleteNotebook can be used for writing the codes and then save the codes in .js or .htm/.html. Run the saved file on any browser.
ReplyDeleteDart is introducing concepts of OO to the client-web, when javascript along with closure tools already addresses these shortcomings. There is already great investments in terms of time and knowledge on JS. The closure library is awesome, code written in it is familiar to OO developers and coupled with the closure compiler is gives to lighting fast optimized javascript that 100% of the browsers out there understand.. if you had to bring in a VM based language for the browser, why not use Java, like its being used for android.
ReplyDeleteHey, any body can reply ?
ReplyDeleteCan it be integrated with GWT ?
I agree with Tnevzn, they are reinventing the wheel. Besides will it need a VM? Another one?Right... I'll stick with javascript, thanks.
ReplyDeleteSo, for a newbie, what should we do, learn "java" first or "DART" ?
ReplyDeleteThis looks great..
ReplyDeleteHave you guys planned in future possibility of compiling the statically typed libraries and programs directly to machine (native) code?
ReplyDeleteThat would really make my day! Prototyping with dynamic laxness and afterwards speeding up with native code by compiling.
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeletehi,
ReplyDeletei understand that maintaining large javascript applications is a nightmare but i thought gwt has solved that problem :).
please tell what was your motivation when designing new language? is cross-compilation from java less effective than from dart? or you plan to finally incorporate dart in browsers and treat cross compilation as short term solution -> but then, what is the future of native client?
i really found writing javascript a pleasure, and knew it it is completely wrong for large scale apps to be maintained in long term. but i have seen it as best scripting langauge i ever seen. with extremely powerful and free js engine (v8 - thanks to You Lars :))
but as to large apps -
is something wrong with gwt that you needed dart? (as to maintainability of large scale business web applications)
have you stopped believing in future of native client? (as to when performance really matters)
regards,
tomek
What is the diff between GWT and Dart
ReplyDeleteawesome, can't wait
ReplyDeleteBest Wishes for DART, Is this language is similar to js?
ReplyDeleteI think programmers and engeneers should take off the fear of coding in JS. Congratulations for the new language!
ReplyDeleteAn analysis of exactly how DART will improve on the current GWT approach would be much appreciated. We have developed very large apps using GWT and would be reluctant to move to DART without such an understanding.
ReplyDeletegood language, it is same js.
ReplyDelete