Slashdot Mirror


Analysis of Google Dart

An anonymous reader writes "Google's new language landed with a loud thud, causing lots of interesting debates about the best place to stick semicolons... An article [in InfoQ] ... looks at some of the less discussed features. Snapshots seem to bring something like Smalltalk images and allow instant startup of applications (something Java has spent the last 15 years not delivering). Isolates are like OS processes and communicate with message passing — and as the article suggests, can fix the problem of Garbage Collection pauses by splitting up the heap (sounds like Erlang). There's more, mostly about features that remove some dynamic behavior in order to make startup and code analysis easier. Maybe Dart is worth a second look?"

16 of 171 comments (clear)

  1. can't believe they missed this one... by larry+bagina · · Score: 5, Funny
    0 == false // expected
    1 == false // wtf?

    Yeah, everything except for true evaluates to false.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

    1. Re:can't believe they missed this one... by jrumney · · Score: 3, Insightful

      In a strict typing sense, an exception makes sense. Pretending that any integer is either true or false is not strict typing, it is a convenience feature mostly offered for backwards compatibility with C, so making it incompatible with C like this makes no sense at all.

    2. Re:can't believe they missed this one... by gutnor · · Score: 4, Interesting

      Clearly it doesn't actually affect the quality or the usability of the language - JS seems to be used just fine.

      That is a bit ironic talking about a language designed to replace JS because Google thinks JS is "unsalvageable".

  2. Re:What? by AndrewStephens · · Score: 5, Interesting

    Oh please,

    Java (or more correctly; its user base) has been crying out for some sort of faster startup since the mid 90s. No other problem has done more to keep Java off the desktop that the very slow startup times. If Java applets started as quickly as Flash objects manage to then we would still be seeing Java implemented on major web sites. I could never understand why Java doesn't snapshot and cache a prelinked version of a class the first time it loads, if anything the JVM is getting slower - the demo Java Applets on my website take about as long to start up in 2011 as they did in 2000 but my computer is many times faster.

    --
    sheep.horse - does not contain information on sheep or horses.
  3. Re:What? by flimflammer · · Score: 3, Funny

    Did we strike a nerve?

    Forgive us if the lack of a promise from Sun/Oracle to implement it didn't stop us from feeling it was necessary for startup times to be quicker than that of a slug crossing a freeway.

  4. Re:What? by AndrewStephens · · Score: 3, Interesting

    You an not wrong, but are missing the point. Java conceded the desktop to other technologies not because it was an inferior language (I find that even the much-maligned Swing produces very nice UIs) but because it took an age to start, making it unacceptable for any kind of in-browser use.

    --
    sheep.horse - does not contain information on sheep or horses.
  5. Re:Girl analogy... by c0lo · · Score: 3, Funny

    Many girls are worth a second look, but each time I try, they're still as ugly as they were...

    I can't grasp girl analogies... can you please come with a car one?

    --
    Questions raise, answers kill. Raise questions to stay alive.
  6. Re:What? by Anonymous Coward · · Score: 4, Funny

    Xbox Live much, bro?

  7. Re:What? by sodul · · Score: 3, Informative

    I just tried Hello World in Groovy and it took almost a whole second (measured with time: 0,7s avg, 0.952s max, 0.668s min) for it to run on my MacBookPro (latest high end 17" model, not ssd).
    Perl did it in about 0.007s average (0.011s max, 0.003s min), Python in 0.020s average (0.023s max, 0.017s min).

    So in practice it takes a 100 times longer to load with no libraries included, it get worse if you do have dependencies.

    Not an issue for a server/deamon app, a real big deal if you need to write a command line tool.

  8. Re:What? by LordLimecat · · Score: 3, Insightful

    I understand Java is generally no speed demon compared to native compiled code, and desktop hard drive performance has almost stood still for ten years,

    If by "stood still" you mean "almost tripled for mechanical drives", then yea, sure, i suppose.

  9. New Programming Languages by sunderland56 · · Score: 3, Insightful

    Every few days someone comes by with a new programming language claiming to be the best thing since sliced bread. Nobody every shows a scrap of proof.

    • - Take some open source programs coded in other languages. (Not 20-line apps - things that are significant).
    • - Recode them in your new language of the day.
    • - Show how much (easier|faster|better|clearer|whatever) your new language is compared to the old ones.
    1. Re:New Programming Languages by afabbro · · Score: 3, Insightful

      Even better, do something in your new language that we couldn't do before.

      --
      Advice: on VPS providers
  10. Why Flash is fast by Animats · · Score: 3, Interesting

    If Java applets started as quickly as Flash objects manage to then we would still be seeing Java implemented on major web sites.

    First, the Flash run-time is incredibly tiny. It used to be under 1MB, and it's still not all that much bigger. Compare to browsers that need 100MB to display "Hello, World".

    Second, Flash can display without loading the entire file. It's an animation format, remember. There are two streams, a timeline of events and a collection of assets (images, etc.) As soon as some timeline data and the assets called out in it have been loaded, play can start. Files are explicitly laid out in time order of use. That was a really good design decision.

    Java is just loading and running programs. There's nothing special about the way it starts. First the VM has to load, then the JIT compiler has to do its thing, and then you get to execute something. There's no explicit concept of time, as their is with Flash files.

  11. Re:Go or Dart? by afabbro · · Score: 3, Interesting

    They are different. Is it surprising for one company to spin out more than one language? For a company of their size and age, Google has actually not invented very many. Compare to Microsoft, Apple, Sun, and Adobe who have each created several.

    Your point is valid, but MS, Apple, and Sun were all operating system publishers and creating languages makes sense. Adobe was long a tool maker and their languages were tooly.

    Google has become an operating system publisher only relatively recently (Android) and these languages don't target that platform. You could argue ChromeOS is an operating system but really that's just a Linux distro.

    Google creating programming languages is sort of like Yahoo or Facebook creating programming languages. In Google's case, I suspect that these creations have little to do with their actual corporate mission and more to do with their wildly undisciplined engineering management.

    (That doesn't indicate they're good or bad languages, of course.)

    --
    Advice: on VPS providers
  12. Re:Go or Dart? by Tom · · Score: 3, Interesting

    Google creating programming languages is sort of like Yahoo or Facebook creating programming languages. In Google's case, I suspect that these creations have little to do with their actual corporate mission and more to do with their wildly undisciplined engineering management.

    (That doesn't indicate they're good or bad languages, of course.)

    It also doesn't indicate that "undisciplined" is bad in any way. A lot of the successful Google projects have come out of their "long leash" attitude towards their coders.

    --
    Assorted stuff I do sometimes: Lemuria.org
  13. Re:What? by MichaelSmith · · Score: 4, Insightful

    Say I wanted to write ls in Java. Startup time would be very important to me. Having dived back into Java development recently the bloat is getting me down. Nobody does anything small, except on Android where Dalvik does some of the caching and optimizing instead of the normal Java runtime.