9 ms·
I think Dart is sort of like CoffeeScript in that it was an experiment and influenced a lot of JavaScript standards people. A lot of the features of CoffeeScri
by bhouston 12y ago
I think Dart is sort of like CoffeeScript in that it was an experiment and influenced a lot of JavaScript standards people.
A lot of the features of CoffeeScript are being integrated into JS with ES6 and ES7. The same is actually happening to the unique features of Dart such as typing and SIMD and better modules.
Typing is so cool: http://wiki.ecmascript.org/doku.php?id=harmony:typed_objects http://wiki.ecmascript.org/doku.php?id=harmony:typed_objects
SIMD is amazing: https://github.com/johnmccutchan/ecmascript_simd https://github.com/johnmccutchan/ecmascript_simd
So, thank you Dart for showing us the way!
My only worry is that the innovators behind Dart are going to be stuck on the Dart project while JavaScript gains their features and even more momentum. I would suggest that they let Dart die and not be stuck with it for years after it has stopped being relevant -- that would be a waste of their talents as they did really see what the future would be.
- sethladd 12y agoDart is much more full-featured than CoffeeScript. Dart is a completely new language, with much improved semantics. Dart has features such as method cascades, mixins, async/await, optional types, a rich core library, factory constructors, libraries, named parameters, lexical this, Futures, implicit interfaces, generics, and lots more. [disclaimer: I'm on the Dart team]
- bhouston 12y agoI am not saying Dart and CoffeeScript are comparable in terms of features -- not at all, rather I am saying that both Dart and CoffeeScript have served similar purposes in showing where the JavaScript language can evolve towards in the future.
- kybernetikos 12y agoOn the other hand, persuing the strategy that Google did with Dart distracted people and effort from the important task of actually improving javascript, so it may well have been a net negative.
- nathan_long 12y agoIf they'd succeeded in replacing it, there would have been no need to fix it. It's a big task, but I wish they'd succeeded and hope they (and/or others) try again. Whether you like JS or don't, I think we can all agree that it stinks to have only one choice for client-side scripting.
- nailer 12y agoES7 has async/await. Coffee script has a tighter syntax despite being older than Dart. Typescript has optional types and is being used at both Microsoft and Google. Also: you don't think JS has libraries and mixins?
- skybrian 12y agoHow about: "ES7 will most likely have async/await when it's finished." Sorry, using the present tense for things that will be in browsers years later (hopefully) is a common practice that's an issue with me. Let's stick with what people can actually use today. Also, pointing to features people can use in different dialects of JavaScript is not really fair. Just about everything you can think of has been experimented with and probably deployed somewhere. It doesn't count unless it's all available in the same toolchain and can be used in a unified way while writing a single app.
- have_humility 12y ago> Sorry, using the present tense for things that will be in browsers years later (hopefully) is a common practice that's an issue with me. Let's stick with what people can actually use today. If that's the metric we're applying, Dart fares no better...
- skybrian 12y agoThere is certainly influence in many directions. For example, some of the GWT and Dart compiler folks were inspired to do better by a presentation at Google about TypeScript, and ideas from AtScript were picked up by TypeScript. "Just stop what you're doing" isn't helpful. People need to write code today, and we have solutions for them.
- bhouston 12y ago> "Just stop what you're doing" isn't helpful. People need to write code today, and we have solutions for them. There is a difference between having innovators on a project versus maintainers.
- skybrian 12y agoLess than you'd think. Starting from scratch is easy at first since you have no users and freedom to do what you like. Maintaining a popular project well requires more creativity in some ways because design constraints built up over time. Improving the web, in particular, requires that people think like maintainers and innovators.
- tosh 12y agoI also think it is great to see innovation from compile-to-JS languages to tickle down to JavaScript over time. This is awesome for JavaScript as well as for the compile-to-JS languages. That said, there is a glass ceiling of how far you can go with iteratively improving JavaScript. I'm glad that there are more ambitious languages like Dart that are designed from scratch by people with amazing background in language design & runtimes. Having worked with Dart now over many months at Blossom (https://www.blossom.co https://www.blossom.co) I can't imagine going back to writing JavaScript (not even ES.next++). Dart is conceptually much simpler. I really encourage you to give it a try. Dart gives you a consistent and simple platform (stdlib, packages, tooling, …) to build upon that works well 'today'. It is easy to pick up and be productive in (compared to JS and all the things you have to train people on about its ecosystem). With this new direction I expect the interop story with JavaScript to improve further as well.
- WhitneyLand 12y agoFalse comparison to ES.Next. Once you accept cross compiling as a premise for Dart the comparison is to every other innovative/productive language out there.
- sredna 12y agoCan't agree more. When a new language is created, its feature set is a product of the times it is created in. i.e. what features are considered useful, popular, best practice etc. Of course times change and with it what this set of desirable features is. Languages evolve by adding support for some of these new features. But adding these new features whilst preserving the old becomes increasingly difficult and the new features tend to be somewhat hobbled and don't fit that well with the older features. For the first 10 years or so this tends to be ok but when languages get to the 10 - 20 year mark they start looking increasingly like frankensteins monster - a mixture of parts from different places / eras, none of which work terribly well and which don't fit that well with others. At some point IMO it's worth jumping to a new language despite the smaller community and package availability. But it's often only when you do try it for a while when you realise how much better the dev experience is compared to the frankenstein languages which have on paper adopted similar features. To me this is where Java, JavaScript, Python etc are now. On paper they can claim many of the features now that Dart has but the experience using them is not that of using those features in Dart. I can't imagine there are many decent developers who if they really give dart a proper go, wouldn't much prefer to work with it than JavaScript.
- alwillis 12y agoThis is only about the Dart VM, not about the Dart language. Everything that’s great about the Dart language is still great, including all of its advantages compared to Javascript, perhaps the single biggest one being Dart’s sane and logical syntax compared to JavaScript’s. Just because JavaScript is the de facto runtime of the web doesn’t mean we all have to develop in it. I’d much rather write in Dart (or CoffeeScript, TypeScript or whatever) than JavaScript—and then only I have to.
- frowaway001 12y ago> This is only about the Dart VM, not about the Dart language. The writing is on the wall already. If Dart hasn't the chance to become a natively supported language, why would anyone pick it as a compile-to-JavaScript language, given there are so many superior options?
- hydrogen18 12y agoWhat do you find superior to Dart?
- frowaway001 12y agoScala.js, Elm, PureScript, ...
- skybrian 12y agoI'm a big fan of Elm but it's still experimental. Major non-backward-compatible changes to the languages still happen sometimes in new releases. Not the same thing, really. (Don't know that much about the others.)
- frowaway001 12y agoThen pick Scala.js. Solid, mature, great libraries and one of the best languages out there, even when competing against real (in the sense of not compile-to-JavaScript-only) languages.
- wrsh07 12y agoI definitely agree that the impact of dart on ES6+ is perhaps the best reason for its existence; however, I don't think it has outlived its usefulness yet. That said, I also hope that they reevaluate their position in the world in a couple of years once Javascript has advanced down the road blazed by eg Dart and CoffeeScript. [also, Dart can just be thought of as an abstraction for the language of JS, and what problem can't be solved by just another layer of abstraction? :P ]
- rjbwork 12y ago>what problem can't be solved by just another layer of abstraction? :P Too many layers of abstraction. :P
- cpeterso 12y ago> Too many layers of abstraction. :P Not necessarily! That next abstraction may enable you to simplify your implementation, carving out lower layers of abstraction cruft.
- kevingadd 12y agoI'm not sure you can argue that Dart is where these features are coming from. SIMD and known type shapes are both very old features that people have been demanding for years. If you follow es-discuss the language you see referenced the most (other than academic ones like E) is C#, by far. The Typed Objects proposal dates back to 2013, possibly earlier, and it's a feature people have wanted for longer than that (ES4 arguably addressed it.) Dart certainly helped influence the SIMD proposal, however, and that's great - it seems like that might have languished for years otherwise. Regardless, Dart is a great proof-of-concept for strong typing in a browser environment and I'm sure it helped renew faith in it after the disastrous results of the ES4 effort. I would be interested in seeing Dart's approach to typing attempted as a layer on top of JS. Sort of a 'stronger' TypeScript where the compile pass enforces the kinds of type guarantees Dart provides, perhaps.
- paulirish 12y agoTo be fair, SIMD in JS was kicked off by John Mccutchan who was on Dart and soon after joined Dart VM team. While there was appetite for SIMD in JS (Brendan, in particular, was a big proponent of John's proposal), I think it wouldn't have happened when it did without Dart and his work.
- BrendanEich 12y agoConfirming what Paul writes here. John tweeted, I tweeted back, here: https://twitter.com/BrendanEich/status/308343704194781186 https://twitter.com/BrendanEich/status/308343704194781186 SIMD is in all the SoCs of course, which means it has been on JS stewards' radar for a while now (remember River Trail? see my blog post, which had early Dart humor and Dash-memo reaction: https://brendaneich.com/2011/09/capitoljs-rivertrail/ https://brendaneich.com/2011/09/capitoljs-rivertrail/). I worked at MicroUnity from 1992-5 on many high-risk things including a new CPU that was designed to do extensive SIMD and bit-moving instructions; using these in an instruction-level simulator, I implemented 64-QAM demod and Reed-Solomon error correction for the cable-net of the day (TCL, remember them?). Alas the CPU design was unrealizable in hardware. SIMD has been around quite a while in hardware, so as KGadd says intrinsics for it have shown up in major languages. It was only a matter of time and the right person for JS, and John McCutchan did the job. Thanks, John! Google funded John's work for Dart and didn't keep him from doing JS uplift, so thanks to Google too.
- ggchappell 12y ago> My only worry is that the innovators behind Dart are going to be stuck on the Dart project while JavaScript gains their features and even more momentum. I would suggest that they let Dart die and not be stuck with it for years after it has stopped being relevant -- that would be a waste of their talents as they did really see what the future would be. I am somewhat sympathetic to what you are saying here. OTOH, the fact that the web is basically all one programming language[1] is a situation that I find a bit unfortunate. Why shouldn't the browser have a PL ecosystem as rich as the desktop? And why couldn't Dart be part of that? [1] Yes, I know the world is full of compile-to-JS languages. But still, being a web developer today mostly means being a JS developer.
- hmsimha 12y agoI know absolute fuck-all about dart, but I do know that a programming language is just a tool. At the end of the day, a good programmer should be able to learn to use the best tool for the job, even if that tool resembles a swiss army knife. It's apparent that Javascript has taken cues from nearly every other modern programming language at this point. The leaps and bounds being made with ES6 and ES7 are simply astounding. Of course, I have no problem seeing the development of languages like Dart, Coffeescript, and Typescript that compile to javascript, but I think there's an argument to be made for the reduced need of these. The development effort being poured into them has shaped javascript, but I think what many people are realizing is that the focus doesn't need to be on creating new languages that compile to Javascript, when it can be on advancing Javascript even further.
- BrendanEich 12y agoGood for lulz, but this is really uninformed, if not made up from whole cloth. The influence of Dart on ES6 and 7 apart from SIMD (John McCutchan shout-out, John did the Dart work and then worked on https://github.com/johnmccutchan/ecmascript_simd; https://github.com/johnmccutchan/ecmascript_simd; I had some small helpful role to do with the project involving Mozilla and Intel, too) and the courage and validation -- not the idea, which pre-dates Dart -- of giving the for (let...) loop a binding per iteration in ES6 as in Dart, there has been no influence or help from Dart. Modules in ES6 have nothing to do with Dart, and the work started in 2010, well before Dart ("Dash") leaked. Classes too pre-date Dart, in some ways they go back to JS2/ES4 of the 1999-2003 era, and ES4 of the 2006-8 era. CoffeeScript owes a lot to Ruby and Python, of course, and I did design-champion fat arrow functions into ES6, inspired in part by CoffeeScript. ES6's for-of loop is responding to the same gravity-well as CoffeeScript's for-of, but it differs in substantial aspects. And so on. Languages influence one another -- news at 11 -- but Dart did very little intentional uplift work for JS. SIMD is the big and very good exception to this norm. Better late than never, I say. Now is a good time to help get value objects including bignums into ES7. https://code.google.com/p/dart/issues/detail?id=1533 https://code.google.com/p/dart/issues/detail?id=1533
- bhouston 12y ago> Good for lulz, but this is really uninformed, if not made up from whole cloth. To be clear, I didn't say that Dart or CoffeeScript associated people actively meant to be a guide for JavaScript (I'm pretty sure that having CoffeeScript and Dart effectively subsumed into JavaScript wasn't the goal), but the fact that these languages existed and has neat features did served as a guide for evolution of JavaScript. Thus I am making the case of much weaker case of languages influencing each other, rather than a stronger case. And there is massive influence going on here, whether intentional or not -- the speed at which features of Dart and CoffeeScript being pulled into JS is very rapid. I think your comments actually bare this out -- Dart people helping with SIMD, and you being inspired by CoffeeScript.
- BrendanEich 12y agoYou wrote "influenced a lot of JavaScript standards people." Please name two. You wrote "The same is actually happening to the unique features of Dart such as typing and SIMD and better modules." My reply: no, yes (thanks to bottom-up work by John McCutchan, not "Dart people" plural -- there you go again), and nope. Any types for ES7/2016 or beyond are likely to be based on TypeScript, Flow, and V8's SoundScript experiment, not on Dart. Modules in ES6 have no relation to Dart modules/packages. Really, "exaggeration" doesn't being to capture the false overreach of your first comment, and walking back from it to vague "everything's influencing JS" isn't helping. Apart from SIMD, Google by investing in Dart at cost to JS (recreated V8 team; replace-not-embrace strategy for ~5 years) missed out on uplifting ES6 to have bignums and other things that would materially aid correctness and performance of dart2js, which is now the only way forward for Dart in browsers. I hate playing Cassandra, but the good news is that Troy didn't fall: JS prevailed, at some unnecessary cost, and as predicted. See https://news.ycombinator.com/item?id=2982949 https://news.ycombinator.com/item?id=2982949 et seq.