4 ms·
The title is inaccurate, they weren't using JavaScript before, they were using CoffeeScript. Seems that the story is they are moving towards a more opinionated
by MatthewPhillips 14y ago
The title is inaccurate, they weren't using JavaScript before, they were using CoffeeScript.
Seems that the story is they are moving towards a more opinionated language/framework. That it is Dart isn't the story here; they don't even mention the Dart VM as a benefit for the switch. It just as easily could be ClojureScript, which provides all of the same benefits.
- michaelwww 14y agoCoffeeScript is JavaScript with syntactic sugar so the title is accurate.
- MatthewPhillips 14y agoBut the title makes it sound like they are changing languages when what the post is actually about is switching ecosystems.
- mraleph 14y ago[disclaimer: I work on Dart VM] Even though Dart VM is not a deployment target for the client side code right now it is still an integral part of the development experience. It runs all your code while you develop (no need to compile to JavaScript just edit&refresh) and backs things like dart2js, dwc, pub which are all written in Dart itself.
- MatthewPhillips 14y agoRight, but the author here doesn't mention the Dart VM as a reason for the switch; they are not switching to get better performance in Chrome. They are switching because they like the language/ecosystem better. Also, IANAL but I'm pretty sure you don't have to include a disclaimer to post on the internet. No one is going to rush out and buy Google stock based on your comments so there is no conflict of interest to what you wrote.
- mraleph 14y agoYes, I agree with your point. Yet, I see quick edit&refresh as the part of the ecosystem. Hard to enable that without VM. [regarding the disclaimer: I add it for two reasons. First, I have seen people accusing others of hiding their bias, so I prefer to state my affiliation explicitly. Second, if anybody wants to ask any Dart VM related questions and get response they know where to ask :-)]
- _jmar777 14y agoSweet... so how does Dart compare with asms.js? /me ducks :)
- kyrra 14y agoSerious answer: The Dart2js compiler could easily take advantage of asm.js additions, and generate javascript code that uses asm.js. If asm.js does take off, all it can do is help Dart generate faster running code. Now, if we are talking about the DartVM, asm.js could be used as an argument not to include the DartVM in other browsers. But asm.js is still very much in it's infancy, so we really need to wait and see how it's adopted and how it progresses.
- _jmar777 14y agoThanks, I agree with your comments. I was mostly just trying to poke the bear, though (http://mrale.ph/blog/2013/03/28/why-asmjs-bothers-me.html http://mrale.ph/blog/2013/03/28/why-asmjs-bothers-me.html) :)
- ryeguy 14y agoNo it couldn't. asm.js has no garbage collector. The only way to get dart running on asm.js would be to port the entire VM to asm.js, which afiak won't work since the dart JIT emits machine code at runtime.
- _jmar777 14y ago
- deleted 14y ago[deleted]
- lennel 14y agowe've been using closure for a long time now, would you say the js dart produces is faster than extremely well annotated closure code (97%+ with all the optimisations turned on). The other big thing from our perspective is the closure library (and a bit of templates), without the library being available it just does not make sense to make the switch.
- coldtea 14y agoGuys, if you can get somebody to write a decent (say, Flask level) server side Dart framework, Dart could gain a lot of ground there. Server side is were people are looking for nicer solutions that what's available, even moving away from RoR towards more one-page-app friendly stacks. It's also an area were IE compatibility doesn't matter (because we're server side), whereas raw speed, good tooling, type checks and such matter a lot, so it plays to Dart's strengths, especially if it could provide both a freaking fast raw server performance (the way V8 is already 10x faster to PHP and Python) AND a good async story with futures, that for Node.js are bolted-on.
- Daegalus 14y agoSince I primarily enjoy using Dart on server-side and like to use it as a replacement for Node when I can, I am actually working on a CRUD framework with middleware for Dart. Inspiration comes from Express for Node, but it is similar to what you can achieve with flask. Give it a look, and file feature/bug requests if you want to see something or something breaks. I know of 1 person that implemented a Google Oauth endpoint with it, so it does work well. http://github.com/Daegalus/fukiya http://github.com/Daegalus/fukiya
- ahoge 14y ago> ClojureScript [...] provides all of the same benefits. That doesn't seem to be the case. Dart provides great tooling and you can also step-debug your code from within the IDE. The workflow with Dartium (Chromium with embedded Dart VM) is pretty neat. The performance of the generated JavaScript is pretty good, too. There are also Dart Web Components which give you custom tags (with shadow DOM) and two-way data-binding. Finally, Dart, with its "boring" C-like syntax, is familiar to pretty much anyone.
- MatthewPhillips 14y agoSure, but those aren't the arguments the post made. The post focused primarily on the ecosystem and package management aspects, which Clojure/script certainly has.
- tosh 14y agoI only mention the virtual machine very briefly in a list of things that come with Dart (batteries included rock) as I didn't want to loose/confuse the reader since there are no browsers that come with a Dart VM yet (except Dartium which is awesome for development). As mraleph already mentioned the Dart VM is very useful for the instant-feedback development experience that you get from working with Dart. It would be awesome to see it in Chrome or other platforms going forward but having it from the start is a big plus for day to day development and for the people building infrastructure on top of Dart. There are also people who do exciting stuff with the VM in node-like scenarios. I personally can't comment on that because we haven't looked into that use-case yet (our backend is in Python and App Engine does not support Dart yet) I'm very interested in the VM and I guess we'll see some interesting things in this area going forward.