Adobe Flash API ported to Dart
github.com
github.com
It should be out of technology preview later this year.
> JavaScript sucks if you don't know how it works
It's possible to understand JS and want better. I think the people behind V8 and Dart know how JS works.
> what's the point of writting this when Dart itself compiles to JavaScript
What's the point of writing anything in any language? The Dart VM will be included with Chrome and other browsers are free to include one, too; Dart->JS is for browsers that don't and the goal is that it'll perform similar to hand-written JS.
> who the fuck uses Dartium as their primary browser
Nobody. It's for development until the Dart VM is included with Chrome.
I just runned it on FireFox and Chrome, and it didn't have a single error, you running the demo on what browser ? Did you even run the demo ?
This is a good start for anyone wanting to learn what Dartium is: http://arstechnica.com/business/2012/02/google-has-released-...
Stay happy.
This might be useful as stop-gap. But I would hate to bug-test anything built using this method.
while i'd agree that now's probably the time to jump into JS and HTML5, some people think Dart has a future, and I guess this opens up its potential market.
In my opinion, it is better to pick up Haxe if someone is coming from AS3. You can use javascript for the HTML5 compile target, you get extended Mr. Doob three.js support provided by the author himself, node.js through the Noxe Lib extends, and much more. And that is just for the HTML5 target.
It even target compiles to Android and iOS through the Haxe NME framework.
They are adding Java support to the thing and it has been doing c++ and php for some years. There are no silly ";" fights and honestly it is good to be able to use the same code source to run on multiple plats.
Though Dart may well pick up and Easel is already becoming a thing.
That's not what this is. The API has been ported, they haven't written a AS3 -> Dart compiler.
Example:
http://www.jangaroo.net/files/examples/flash/open-flash-char...
Samples: http://www.dartflash.com
Source: https://github.com/bp74/dartflash/tree/master/samples
Some words about the Dart language. It's great to work with this new langauge and much more fun compared to javascript which is a pain when you come from the ActionScript/Java/C# world. In Dart you feel at home right from the start. Google is very much committed to the project and we will see pretty amazing things in the future. Of course the Chrome browser (Desktop and Android) will support the Dart VM in the future. The dart2js compiler allready works great and has improved a lot over the last weeks.
NME is not as easily recommended. It has very high coverage, and it's shipped a few products as demonstrated in the showcase, but the build process still shows immaturity; the Flash target is wonderfully consistent, but other targets remain pretty fragile. The general trend is "better with time" though.
The main problem seems to be flash is really directed to pixel/bitmap manipulation. While on cpp/OpenGL that is extremely slow, and you have to use something like a Vertex Buffer Object.
The end result is that you probably will still have to keep two (at least) separate rendering paths if you want to support all targets.
That being said, the fact that the mobile platforms (android and iOS) are the same target (cpp), together with desktop (osx, linux and windows) makes it a very nice platform for developing a game. IMO the html5 target is the weakest link at this point.
if you want to code html5 flash, I hear another alternative is jangaroo
JS has flaws, of course, but reacting by trying to make a completely different paradigm language that compiles to it seems a bit of an overreaction.
I have allready written tons of Dart code, and i have to admit there were a few issues with the JS-code regarding cross browser compatibilty (btw. it is easy to read the generated js-code). Those issues were problems in the dart2js compiler because it's a alpha-version right now. The dart2js team fixed all those bugs. As soon as the compiler will finally ship we will rely on the generated output - no need to debug "assembly language".
The constant is coming from the runtime library (or, more accurately, the portions of the runtime library that your program uses). That's relatively fixed so as your Dart program gets larger, the overhead of that becomes relatively smaller. The actual code-size multiplier when going from Dart -> JavaScript is actually fairly small and getting smaller over time.
In some cases, we may actually compile Dart code to less JavaScript code because of things like dead code elimination and constant folding.
JavaScript code size is something that we consider a core metric for dart2js and we're constantly working to reduce it.