4 ms·
This is called "a runtime". A bunch of things that have to be loaded on the target machine for use by a compiled program. Just about every compiler works this w
by yaakov34 15y ago
This is called "a runtime". A bunch of things that have to be loaded on the target machine for use by a compiled program. Just about every compiler works this way, whether the output is machine code or JavaScript. It is possible to not emit or load the parts of the runtime which will not be used by a given program, but that's difficult and in many cases even impossible.
I am not a web programmer, and I don't use JS and don't plan to use Dart, but I am flabbergasted that a bunch of techies are going wild and posting facepalm pictures over a perfectly normal technical situation. Maybe Google will pare down the runtime in the future, maybe they will figure out a way to exclude parts of it which are not needed, but right now they are just making the default technical choice that just about all compilers make. This is a non-story. Compile "Hello world" into an executable, and see how many kilobytes it takes on most architectures, despite the object file being a few bytes. Geez.
- ootachi 15y agoIn general it's true that you can't avoid the runtime, but in this case I think people's expectations are colored by CoffeeScript, which offers (for many) a more productive environment than vanilla JavaScript, with no runtime at all. Since Dart is a CoffeeScript competitor in the "languages that compile to JS" space, this is a legitimate disadvantage. Dart may well have so many advantages over CS that this becomes a non-issue in practice, but we shouldn't pretend this isn't a story at all.
- yaakov34 15y agoI agree that it's perfectly legitimate to discuss the runtime needed for Dart, and point out that it's a disadvantage that it is needed at all, or to criticize the runtime, or whatever. What shocks me is that people who are supposed to be techies are pointing their fingers at the runtime and making monkey noises, because they apparently have never seen a language runtime or heard of the concept. Dart did not compile "Hello, world" to 17000 lines of code; most of that code has nothing to do with the specific program. And that's the usual situation for compilers, although some specific compilers can avoid that (e.g. CoffeeScript, which is a close mapping of its target architecture).
- maratd 15y agoThe reason we are making monkey noises and pointing fingers is because we expected a better JavaScript, not a Java that compiles to JavaScript. We already have that. It's called GWT and this is just GWT 2.0 with a pretty name.
- stickfigure 15y agoThere's already a GWT 2.0; this is more like GWT 9.0. And as someone who has done a lot of work in GWT (and JS, and CS), I can see a lot of potential in Dart. GWT is superior to javascript/coffeescript for a certain set of problems (mostly fat-client-type webapps); a major upgrade to the language and tooling would be welcome.
- deleted 15y ago[deleted]
- DanielRibeiro 15y agoThis thread answers how long a Hellow World executable is: http://news.ycombinator.com/item?id=3098672 http://news.ycombinator.com/item?id=3098672
- mike_ivanov 15y ago> This is called "a runtime". > I am not a web programmer You see, it's not a spherical runtime in vacuum. In practical terms it's more like a whole lot of stuff to download, parse and execute each time your browser hits a new page.
- eli 15y agoshrug I bet most of the people including JQuery on their pages only use a fraction of its functionality even though it all must be parsed. So what?
- inklesspen 15y agojQuery can be cached.
- munificent 15y ago> maybe they will figure out a way to exclude parts of it which are not needed This is called "tree-shaking", is fairly standard, and is on the to-do list. I believe it does some now, but I think more is coming.
- nathanb 15y ago> I am flabbergasted that a bunch of techies are going wild and posting facepalm pictures over a perfectly normal technical situation Have you actually met any techies lately?