516 points · by kasperset · 11y ago · 285 comments
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
SIMD is amazing: 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.
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; 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.
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.
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 et seq.
[disclaimer: I'm on the Dart team]
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.
What are optical types? I've never heard of this term and Google turned up nothing on it.
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) 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.
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.
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.
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?
I don't think that the premise ("given there are so many superior options") is a non-controversial assertion. Which is probably why people who reject it would (and have been) picking it as a compile-to-JS language for web-facing projects.
The focus on compile-to-JS and JS interop for the web announced in the blog post makes Dart a more, rather than less, attractive language for web development, because it eases fears that taking full advantage of Dart might, in the near future, mean "works better on Chrome" rather than "targets the whole web", and because it means that Dart will work better with the universe of browser-targeted tools that aren't all written in Dart.
The VM is crossplatform and it even supports ARM and MIPS.
They are also working on an interpreter which will get around the JIT restrictions on iOS and Windows Phone.
As far as I can tell, the Dart team set out to create a clean slate approach to what web developers need in a language (front-end and on the server) to address today's complexities. What the Dart team couldn't foresee how many developers would come down with Stockholm syndrome regarding JavaScript.
What people don’t get: adding more crap to JavaScript doesn’t make things easier, it makes things more complex. Think about it: the entire web is depending on a language that was thrown together in like 10 days and renamed from LiveScript to it would contain the word 'Java' because Java was the new hotness back in the day even though it had nothing to do with Jsva.
And now we’re going to add all of the stuff we didn't think about back then when JavaScript was considered a weird, fringe toy language, when the most complex thing anyone did was image rollovers.
JavaScript didn't "win" because it was great; it won because it good enough and we were literally stuck with it.
Not everyone wants good enough; some people want an excellent, purpose built language for the web with all of the goodies we’ve come to expect on Day 1--no polyfills, no hacks, no waiting for a years long standards process to run its course.
I’m looking forward to the Dart conference next month to see what’s next: https://www.dartlang.org/events/2015/summit/.
If there are so many, can you list at least 5 superior options for us please.
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.
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.
I'm probably going to sound very negative in saying this, but I _really_ hate it when people pull this line out like it means anything. Only in the most narrow, trite sense is a programming language "just a tool." They are the whole reason programmers exist. Language is the single most important development in human history, and computers have touched human life in irreversible and undeniably important ways.
Everything is just a tool, if you look at it the right way, and it takes a particular kind of pointlessness to opt to see the world like that.
Language is the thing that makes the genie grant your wish. If you wish with the wrong words, you get a billion dollar tombstone.
Unless it turns out that JS+Flow is actually the best balance between flexibility and safety and the world will reach "singularity".
So I take it you write all your *nix programs in C?
So you think JavaScript is the best tool for the job? I don't think so.
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.
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/).
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.
"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.
Improving the web, in particular, requires that people think like maintainers and innovators.
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 ]
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.
And now today i'm coding in typescript adding type informations wherever i think it could be useful, and looking at typescript documentation to see in which way i could refactor my code to make it safer.
That's probably the fastest migration process you could imagine. Maybe dart would be more popular if they chose that route.
And is it really worth it? As someone all in w/ Dart (I chose to build my product with it), dart2js serves me well, and the resulting JS is said to be more performant than raw JS. JS itself is improving (see ECMAScript 6 and TypeScript), which means Chrome's compiled JS will improve with it. Of course, having the Dart VM in a version of Chromium they call Dartium has been important, as it eliminates the need to compile until I care to test on other browsers. But there's exciting work ongoing on incremental compilation, so that in theory you'd just see your results in any old browser (http://goo.gl/EHJcK9) a la interactive programming. Bottom line: the Dart development cycle is already great and always getting better, no VM in Chrome needed.
As well, the Dart team can focus on more important priorities: the incremental compilation I mentioned, better JS interop (it's not bad now), improvements like async/await (coming in 1.9), even better concurrency primitives (see Fletch), Dart for native apps (again see Fletch) and more.
And remember, this decision can change later when the climate changes or other factors are in play. But for now, it makes a whole lot of sense to abandon any push, or notion thereof, to get the Dart VM into Chrome.
IMHO, Dart (I mean the language, libraries and tools combined) is hugely underappreciated. Folks will continue to focus on improving it and building awesome apps with it, and this news should quiet some of the noise.
But Dart is something else. Dart showed us what JavaScript would have been if it were designed this decade, and with some thought to its architecture. It's clinical in its cleanliness (have a peek at its standard library and you'll agree). It was pitched as a full stack language for web applications done right, and I certainly felt it lived up to that claim.
Personally, I'm more interested in Dart as a replacement for Node.js. Luckily that dream is still alive: "We continue our strong investment in Dart VM for server, embedded, and mobile."
Actually on most of the official benchmarks, dart2js output is slower than normal JS,
https://www.dartlang.org/performance/
(normal JS is faster on 3, matched on 1, and slower on 1).
Of course, the usual caveats apply regarding benchmarks and real-world performance, especially since those 5 benchmarks are fairly small and probably not representative of large real-world codebases. I'm not aware of any good benchmarks for Dart on that (there is a Box2D comparison, but the latest update isn't recent).
And I would be really skeptical about that 1 where they say dart2js is faster.
They removed a layer of indirection in DeltaBlue when they ported it to Dart (not due to any Dart language feature, just for no reason), then crowed about how dart2js made DeltaBlue faster than the original. Despite being made aware of it years ago, they never fixed this! But the JavaScript VMs got better enough to be faster even though running code with more indirection than the dart2js version based on the optimized port.
So when the one benchmark dart2js is faster on is one they say they rewrote because a direct comparison would be "unfair" it sets off alarms.
This claim always bugged me. The output of dart2js is raw JS. Same with CoffeeScript (which makes a similar claim). So these claims are totally reliant on parameters that haven't been defined, ie. what constitutes "equivalent" handwritten code?
I've always assumed claims like this are implying that average case code is written poorly and that's how It could be faster.
However as you point out we'd need all the assumptions made clear to believe such a claim.
But is it more performant than raw Dart?
It may be possible to compile pieces of a Dart program that don't need GC (think pure numeric computation stuff) to use asm.js and use the full JS language for the rest, but I don't know if anyone's seriously looked at doing that.
It seems odd to be arguing for generic computation abilities in the place where most "computation" is done nowadays. Can you imagine what could be achieved if the browser vendors and standards bodies put business considerations aside and spent a good couple of years designing such a thing? We could have an almost endless list of goodies: threads, code isolation, multiple number types...
Just like Intel, AMD, and the rest in effect control (much to Alan Kay's despair) hardware architectures, the vendors & standards bodies are a sort-of natural cartel controlling upwards of, what, 50%? 80%? the code end users actually interact with. The quality of the decisions they make has deep repercussions beyond the tech community and it's simply not possible for any of us to know what they all are. Even if they were bona-fide saints, this would still be too much power to tie up in such a small group.
Starting fresh would take many more than two years, and very likely end in tears. This assumes browser vendors could spare the effort to do JS and the new thing (most cannot, even Google arguably can't).
For why the best VMs are focused on one language, see
https://www.dartlang.org/support/faq.html#q-why-didnt-google...
and
https://www.dartlang.org/articles/why-not-bytecode/
from the Dart team. See also
http://mozakai.blogspot.fr/2013/05/the-elusive-universal-web...
from Alon Zakai of Mozilla.
However I still wonder - is bytecode the only way to go about this? Every compile-to-JS language I've used has either been sugar over JS or had JS's semantics/syntax seeping through the cracks...what if the base language was a Lisp? There's a big difference between being bound to the semantics of a language like JS or dart and those of Lisp.
I have no doubt that a new VM would be a herculean undertaking and be riddled with all sorts of problems, but I remain unconvinced that it wouldn't pay off in the end. Maybe I'm being naive, but if what we're doing now really is as good as it gets then it seems either I'm much more ignorant to the issues at play than I thought or this hole is significantly deeper than even I imagined.
Evolution can fill gaps in JS, and has: typed arrays are one example; generators another. More to do, but it's not as if the distance x cost to suffer in filling gaps is greater than the distance x cost of doing a de-novo VM among all browsers, on top of keeping JS going. It's much, much less.
I've always wondered: why not LLVM? It's low-level, so the speed is there, and I think should be trivial to compile as it arrives at the browser. Tons of stuff already compiles to it. You can compile it to JS. Of course, you'd need to make sure it doesn't make a syscall that's not allowed (and I'm not sure how hard that is), and that it has bindings into JS APIs and/or the DOM, but aside from that…
I'm sure some people will suggest things like the JVM or the .Net CLR, but I feel like those have certain qualities (e.g., GC) that don't appeal to all languages.
Because LLVM is not hardware independent.
LLVM is simply not a good starting point for the problem here, nice as LLVM is for what it does do well.
I'm seeing efforts with asm.js turning JS into a byte code language aka. LLVM IR. I'm not sure if turning JS into a byte code language is the best way either. It is still too high-level language. And it seems like a ugly hack.
The intersting thing is that there's jruby for the JVM, and it makes the different tradeoffs surface better. Looking at this benchmark for instance [0] it's easy to see how the tweaked runtime gives a very different performance profile from the generic VM.
I have a feeling the highish-level intermediate layer you are talking about would be equivalent to have only some specific tradeoffs despite the optimizations that could be done on a language per language basis.
.NET's CLR does well supporting a wide array of different languages very well C#, F#, IronPython, IronRuby etc
https://blog.mozilla.org/javascript/2015/02/26/the-path-to-p...
asm.js illustrated the right political approach -- build something that degrades nicely now, then get the vendors to optimize it.
Dart is new 100% committed to that model for targeting browsers.
In the short-run, your approach is sound. In the large, a web technology isn't a web technology if my browser doesn't support it. Seems that the people in charge of Dart decided it had crossed the event horizon from situation 1 to situation 2.
I know it resulted in some very useful features e.g. AJAX but surely a standards based approach is infinitely better.
1. Tree shaking. The compiler can detect unused code and remove them automatically from the JS output, resulting in smaller files. (Yes I know that Hello World is a bit big, but real projects are not hello world)
2. A really nice IDE with autocomplete, error highlighting, code formating, refactoring, debugger, profiler. It really makes a difference.
3. A VM that's actually faster than JavaScript useful for writing server side applications.
4. A nice an well integrated standard library.
From the article:
Google Ads, one of Dart's biggest customers, is committed to Dart and supports this new strategy. Scott Silver, VP of Engineering for Ads, says, “We are committed to building our next-generation web apps with Dart, and a renewed focus on generating optimal JavaScript helps us deliver great apps to everyone with a modern browser. Dart has significantly improved our engineers' productivity and our ability to quickly launch and iterate. We currently have one million lines of Dart code and the number is growing fast.” Many other teams inside of Google, such as Google Fiber, Google Express, and Google's internal sales team, use Dart for business-critical apps.
A million lines of code is relatively small when you're trying to be all things to all ads customers in the world.
Still, could it be simpler? I hope so.
If it doesn't serve ads it doesn't release cool open source projects no self driving cars, no Anjular JS, no google maps, gmail and so on.
This is a setback for Dart and Dart's mission statement, and everyone knows it, and everyone also knows it's been a long time coming.
[disclaimer: I work on the dart team]
This, alas, falls under the "nothing to publicly announce" umbrella.
> The Dart blog post was unclear about the future of the Dart VM.
The VM team is still moving full speed ahead. In some ways, their job is easier now because they don't have to worry about the (considerable) complexity of integrating the VM into a very large application that already has another language VM, GC, very large set of API bindings (the DOM), etc.
As JavaScript performance and semantics improve over time all the compile-to-JS languages benefit (Dart, Clojure, TypeScript, CoffeeScript, Elm, Scala, …). Win-win.
I'm looking fwd what the Dart team with all their experience in runtimes (& v8 specifically) can pull off with dart2js.
While I would have loved to see the Dart VM included in Chrome I believe we (the web, developers, …) are all better off with this new direction as this way browsers aren't becoming even more complex than they already are.
Dart still has a long way to go towards being mainstream, but I think this will help reduce some of the controversy surrounding it and people can focus on what it brings to developer productivity and app quality.
I hope this happens. Javascript seems like a depressing future to me - even if it's only a compilation target for major shops.
IMO it is much better to focus on improving compile-to-web support with things like bytecode, better debugging, threading, custom value types, hooks into the garbage collector, etc., etc. - making it feel more like "compilation", less like "transpilation" (to the extent the term implies that you have to look at the output) - than to change the number of blessed languages from one to two. The result, if used to compile Dart (or any other language), might sacrifice a bit of performance compared to the maximum achievable by a dedicated Dart VM, but not that much, and there are myriad advantages.
Of all the developers I know that I went to university with a few years ago all with just a few exceptions have moved on from vanilla-js to compile-to-JS languages by now (Dart, Clojure, CoffeeScript, TypeScript, …) and the others are on the fence.
What we need is for JavaScript to become a better compilation target and for even more language innovation. Dart is the most ambitious compile-to-JS option. Take a look at Dart's stdlib, packages and support in IntelliJ.
The better dart2js gets (it is really good by now but I can't wait to see how more focus on it will take it further) the more scenarios where Dart can be used in. Just think about all the places that come with a JavaScript runtime nowadays.
Just think of how the JVM allows people to write Lisp/Clojure in enterprise settings. Having a better and better dart2js story allows people to use the tools they prefer without hitting a bureaucratic wall ("compiles to js? fine.").
> Dart is the most ambitious compile-to-JS option.
Wait WHAT?
Not sure if this is supposed to be irony, but if not I'd like to understand your opinion on this.
I'd recommend instead a comment like: "Consider $otheroption, it has $feature1, $feature2, and $feature3. Furthermore, it is entirely committed to $designprincipal, which provides complete safety against $classofmistake when used correctly, without any $kindofdownside."
This way your reader has something to engage with other than your emotional reaction, and they may have learned something along the way.
I gave a talk about it recently if you want to see.
With ES8 or ES9, maybe.
By the way, optional named arguments with default values look atrocious in ES6.
ES6: function foo({a = 1, b = 2} = {}) {…}
Dart: foo({a: 1, b: 2}) {…}
Dart also supports things like factory constructors, named constructors, method cascades, operator overloading, SIMD, arbitrary large integers, mixins, implicit getters/setters, implicit interfaces, enums, 'a' - 2 is a type error, [0][-1] is a range error, metadata annotations, and of course also optional types.
ES7 might include SIMD and operator overloading.
Another key point is that Dart's doc comment syntax is standardized. It also has an official style guide, a formatter, and a package manager.
To me, these things are also very important features.
new Date(2015, 1, 1)
Guess what date that object represents (hint: It isn't January 1st 2015).http://stackoverflow.com/questions/1969442/whats-wrong-with-...
Actually I think it's pretty terrible how few languages have literal expressions for dates. Once you have to type "new Date(", it's not much more annoying to have to remember that January is zero.
class Month {
static const List<String> names = const <String>[
"JAN", "FEB", "MAR", "APR", "MAY", "JUN",
"JUL", "AUG", "SEP", "OCT", "NOV", "DEC"
];
final int month;
const Month(this.month);
MonthDay operator -(int day) => new MonthDay(month, day);
String toString() => names[month - 1];
}
class MonthDay {
final int month;
final int day;
MonthDay(this.month, this.day);
DateTime operator -(int year) => new DateTime(year, month, day);
String toString() => "${Month.names[month - 1]}-${"$day".padLeft(2, "0")}";
}
const Month JAN = const Month(1);
const Month FEB = const Month(2);
const Month MAR = const Month(3);
const Month APR = const Month(4);
const Month MAY = const Month(5);
const Month JUN = const Month(6);
const Month JUL = const Month(7);
const Month AUG = const Month(8);
const Month SEP = const Month(9);
const Month OCT = const Month(10);
const Month NOV = const Month(11);
const Month DEC = const Month(12);
main() {
print(MAR-25-2015);
}http://www.cplusplus.com/reference/ctime/tm/
tm_mday = day of month (1-31) tm_mon = months since January (0-11)
Which AFIAK goes all the way back to POSIX standard.
The real problem is that JavaScript as higher level language decided to inherit this awkward convention instead of making their own, consistent rules.
Given the time it took to create the first JS implementation, it is no wonder that some shortcuts were taken.
new Date(Heisei, 27, 1, 1)The problem is not with parameter ordering. Year and day are literal, month is zero indexed. So you wind up with (month -1) representing the actual month.
It seems to me that you are not doing your homework and studying hard to get things done professionally.
AtScript is dead now. The Angular folks are switching to TypeScript.
And innovation is right here: http://babeljs.io
The problems with that are:
1. It means every web app basically has to push its own GC down the wire every time the user hits myawesomeapp.com. That's a lot of overhead.
2. You'd have to define what the memory model between the code running in the VM and the browser's native stuff is. What does it mean for the code to have a reference to a DOM element? How does the browser hold a reference to an event handler in the VM?
3. The set of people who can implement an efficient GC is very very small. Forcing each source language to do that themselves wastes a lot of effort. (For example, look at how primitive Python and Ruby's GCs were for most of their histories.)
Now a low-level VM with GC. That's something I'd be excited about.
1. Caching, content-distribution-networks, and possibly shared-libraries could solve or at least ameliorate this.
2. This is relatively easy. The sandboxed code could "open" handles by calling into an API, and the code could "close" them when no longer needed.
3. In many cases, the GC is tied intimately to the semantics of the language, so enforcing a style of GC could be too limiting in terms of performance. Instead, it could be better to implement a GC'ed VM on top of the low-level one.
The biggest problem is to get something like this turned into a standard, and accepted in all browsers. Perhaps a viable route is to write the standard of this low-level virtual machine for the web (LLVM/W) on top of ASM.js (and implement threading by emulation), and then wait for general acceptance, and for browser vendors to implement LLVM/W directly.
That's easy to specify, but is it good for the user? You've just opened the door to memory leaks on my machine in poorly-written "javascript".
https://blog.mozilla.org/javascript/2015/02/26/the-path-to-p...
I guess what we need is something that can be efficiently mapped onto ASM.js (while emulating threads), so that we can transition from the situation where only one browser supports the code to the situation where all browsers support it (and then ASM.js isn't needed anymore).
After developing with Dart for quite a while, I can just not see myself going back to JavaScript, the platform is just that much better.
They didn't.
They ditched plans to integrate DartVM into Chrome from browser-side Dart in favor of continuing to use dart2js for browser-side dart.
I'll have a post up about it soonish at http://work.j832.com
I also hope some great Mozillians will take a second look at Dart now that the main objection (adding another VM to Chrome) is out of the way.
Evolution by inspiration.
Secondly, while the language may appear similar, a large number of its strengths come from actually breaking away from the JS ecosystem, and daring to take the 'less mature' approach. Without all that legacy, it turned out with significantly cleaner libraries and APIs, more intuitive semantics, and and an ecosystem+workflow is worlds apart from the JS style. The difference a few small changes can make in simplicity to lower cognitive overhead is astounding. Building a large, complex app in dart actually feels totally manageable! Yet, regardless of how many new JS tools and libraries come out, it always still feels completely overwhelming. Thankfully they decided to keep this part of dart in tact.
Considering the lack of other browsers jumping on board, I think it is better that Google gradually phase out Dart and let everyone concentrate on making Javascript better (both by improving the language itself, and the libraries). I predict they will stop new development entirely within a few years.
But where was the "bad for everyone" when Google rolled SPDY into Chrome and its own services, and showed not only tangible improvements to HTTP/1.1 but also an actual conviction in its efforts? It took a few years, but there was a good amount of industry momentum behind SPDY even before its ordainment as HTTP/2 became certain.
All Dart ever got was a Chromium fork; how was it ever meant to make inroads without Google putting any wood behind it?
https://www.destroyallsoftware.com/talks/the-birth-and-death...
JS is a terrible assembly language. But the work that's been done on making it passable for that purpose is remarkable, so we're getting by with it.
Having to trace/debug compiled javascript from another language is a horrific future. In your analogy, C programmers would have to debug assembly.
I agree it's the most probable future, but let no one call it innovation when it's simply resignation from lack of options.
Angular2 has been TypeScript from the beginning to support both JS and Dart development.
Angular2 is a better story for both Dart and JS developers.
More info: http://work.j832.com/2015/03/angulartsjsatdartwtf.html
The latest preview release of Angular2 Dart was yesterday - https://pub.dartlang.org/packages/angular2#versions
dart2js or soundscript - which one is the preferred way. If sound script, dart will fall before reaching the goal of structured webapp. Dart on server doesn't excite me as much as single language for end to end development. There is a vaccum created due to soundscript in web development in Dart, these questions should be answered.
Dart tools: pub's (package manager) client, analyzer, dart2js compiler, etc are all written in Dart.
We have a good story for server side developement and we are not looking to abandon it but rather we are looking to expand it, e.g. we just released a package to facilitate creation of REST APIs[1]. Pub's server side is being rewritten into Dart as we speak[2]
Among cool internal users of Dart VM I could mention Google Fiber - they'll share their experience during the upcoming Dart Summit[3].
[1] http://news.dartlang.org/2015/03/create-your-own-rest-api-wi...
[2] https://github.com/dart-lang/pub-dartlang-dart
[3] https://www.dartlang.org/events/2015/summit/sessions/google-...
Looking forward to better interop with JS, but can't help feeling a bit sad.
The Web couldn't care less.
Besides, I think people will really come to like ECMA 6, or whatever it's called this week? I've been using it and love it.