5 ms·
Dart can be compiled ahead of time.
by dman 8y ago
Dart can be compiled ahead of time.
- jbob2000 8y agoMost apps/websites show some text and a few pictures, why is this a benefit?
- allenbrunson 8y agoBecause Dart is also used for compiled Flutter apps, which are meant to compete with native apps written in Java, Kotlin, Objective-C, and Swift. This gives us the obvious advantage of not turning people's phones into space heaters, which would be the case if Flutter apps used an interpreted language.
- jbob2000 8y agoAnd there is no such thing as a slow Java app? Or a slow Objective-C app? Just because it's compiled, doesn't mean it's better. Some websites turn your phone into a space heater because the developer is shit, not because the tech is bad (HN doesn't make my phone blow up...). Dart will suffer the same problem - shit developers - so developing all this tech mumbo-jumbo is pointless. AMP, in my opinion, was a step in the right direction. AMP is google's way of saying "you're all shit at developing on the web, use this very restricted way of developing a website and watch how fast it will go". That's what we need. Don't put developers closer to the computer by giving them compiled languages. Move them as far away from the computer as you can. Languages should be moving in the direction of requiring the developer to do as little as possible. I need to import a package to make HTTP requests in Dart; every fucking app makes HTTP calls these days, how outdated is that? HTTP requests are baked in to javascript, I don't even need to think about what I need to import, I can spend mental cycles on real shit.
- kitsunesoba 8y agoGenerally speaking in the context of normal, non-game apps I’ve found it rather difficult to write Swift or Objective-C in such an inefficient manner that it keeps the CPU spinning and heats up your device. It’s possible for sure but also requires crazy levels of laziness, incompetence, lack of understanding, or some combination thereof.
- skybrian 8y agoThis is a weird objection. Import statements have nothing to do with whether a language is interpreted or compiled. It's just a matter of which names the language designers decide should be imported automatically.
- jbob2000 8y agoHaha, fair criticism, but don't miss the forest for trees. My point was about simplicity - I don't need to worry about this when making a website, but there's this new language and now I have to worry about this? It just feels like a step backwards.
- skybrian 8y agoI'm sure you're right about how it feels, but "feeling like a step backwards" is normal for learning a new language since there's a learning curve. It seems hard to say if it's actually worse? You didn't start out knowing what all the built-in JavaScript functions were, right? If you know you want to use Dart's HttpRequest class, you can just type it and a good editor will add the import for you. But people don't start out knowing what to type.
- thosakwe 8y ago> I need to import a package to make HTTP requests in Dart That's actually not true; the functionality is included in both dart:io and dart:html. package:http is just a cross-platform wrapper.
- qmarchi 8y agoIt's moreso the fact that the underlying pieces improve in quality, goals, and speed. If more apps are just text and a few pictures, why are they running a full copy of the blink and v8 engines and not just using what's required for the job?
- jbob2000 8y agoBecause what's "required" for the job is way too complex for the perceived payoff. That's why the JS/HTML is winning - the time investment to "do something" matches the outcome.