4 ms·
Sort of lost interest in Dart since they dropped the idea of integrating the VM into Chrome.
by munki 11y ago
Sort of lost interest in Dart since they dropped the idea of integrating the VM into Chrome.
- tosh 11y agoimho it makes sense to focus more on further improving dart2js to ensure it works really well across all JavaScript virtual machines and to make interop with JavaScript & TypeScript super smooth. The Dart VM (as well as the Observatory) are fantastic. At Blossom (https://www.blossom.co https://www.blossom.co) we currently use the Dart VM for command line tools but we're looking into using it on the server side as well. I guess you were especially interested in the performance improvements that the Dart VM could bring if it was added to Chrome? I expect that we'll also see performance improvements for dart2js as JavaScript runtimes become better compilation targets (e.g. SIMD.js, BigInt, SoundScript, …). The interesting thing here is that the Dart team can focus on other areas like … * the standalone Dart VM * fletch (an experimental mobile optimized runtime) * Observatory * async/await * libraries (e.g. the new `test` package) * analyzer (used for semantic code completion & warnings and powers IntelliJ, Eclipse, Sublime, Atom (soon), DartPad see https://dartpad.dartlang.org/ https://dartpad.dartlang.org/) * … and many other things in the meantime. Getting the Dart VM into Chrome and have it play nicely with v8 is not trivial.
- brodo 11y agoWhen there is no Dart VM in the browser I honestly don't see any advantage over TypeScript. Two VMs inside each other (with two garbage collectors) will always be slower and use more memory than just one. Additionally, you always need to ship the runtime with all your scripts. You also have to use FFI to interact with Javascript. All the advantages over plain JS you mentioned above are also present in TypeSctipt (or not needed). There is also a nice discussion about TypeScript and Dart here: https://www.youtube.com/watch?v=5AqbCQuK0gM https://www.youtube.com/watch?v=5AqbCQuK0gM
- wtetzner 11y ago> Two VMs inside each other (with two garbage collectors) will always be slower and use more memory than just one. Is that how it works? I just assumed it would compile to JS and just use the JS garbage collector.
- vadimtsushko 11y agoDefinitely so
- tree_of_item 11y agoIt does compile to JS and use the JS garbage collector. The posting you're replying to is very misinformed.
- tosh 11y agoAs far as I understand you are also less likely to run into unpredictable performance (runtime bailing out) scenarios using Dart + dart2js.
- tree_of_item 11y agoWhat second garbage collector are you referring to? There aren't "two VMs inside each other" when you compile with Dart. I think Dart's biggest weakness is the fact that most web developers don't understand how compile to JS languages work and go around spreading all kinds of silly FUD. I remember posting a Gist on the day of Dart's release showing the compiled runtime, and the thread exploding with hundreds of comments from people laughing at the fact that it was 17,000 lines or so, nevermind the fact that that's how every compile-to-JS language that's more than a thin skin over JS semantics works.
- tosh 11y agoTypeScript is definitely an improvement over JavaScript but it is less ambitious compared to Dart (something that is also mentioned in the video you linked to). Dart is more than 'just' a language with cleaner semantics (which is already an improvement upon TypeScript which still is closely tied to JavaScript re type coercion problems etc). See my other posting. The Dart VM exists and can be used on the server side, for command line apps and in Dartium (fast dev cycle & debugging). There is advanced tooling, a very clean standard library, a mobile optimized runtime, bundler inspired package management (pub), a well staffed team of people working on the analyzer and compiler toolchain and a lot of stuff surrounding "Dart the language".
- stesch 11y agoI've read a comment somewhere that they are developing a new dart2js. Is this right?
- tosh 11y agoThe Dart team is working on a compiler called 'ddc' (Dart Dev Compiler) https://github.com/dart-lang/dev_compiler https://github.com/dart-lang/dev_compiler It currently targets ES6 and also comes with a more strict type checker. Project goals: * Effective static checking and error detection. * A debugging solution for all modern browsers. * Readable output. * Fast, modular compilation of Dart code. * Easy use of generated code from JavaScript.