Slashdot Mirror


Google Starts to Detail Dart

MrSeb writes "After waiting for more than a month, Google has unveiled its mysterious Dart programming language... and you're going to kick yourself for getting so preemptively excited. Dart is a new programming language that looks like Java, acts a lot like Java, runs inside a virtual machine like Java... but ominously, it also has a tool that converts Dart code into JavaScript. Language-wise, its features are unlikely to knot your panties: there are classes and interfaces, it is optionally typed (you can switch between untyped prototype code to an enterprise app with typing), the syntax is very lackluster, there's a very strong concurrency model, and Google is promising lots of juicy libraries that can be leveraged by developers. Basically, the language isn't meant to be exciting: in Google's own words, it's designed to be 'familiar and natural' — and indeed, if you write Java or C# code, Dart will probably feel very approachable."

20 of 219 comments (clear)

  1. Enlighten me by Peristaltic · · Score: 2

    .... but ominously, it also has a tool that converts Dart code into JavaScript.

    Sounds pretty mundane to me- What's so ominous about converting to JS?

    1. Re:Enlighten me by bcmm · · Score: 2

      Writing Dart-only websites is obviously a bad idea. Writing stuff that will work an order of magnitude slower on JS browsers could seem like a sensible lazy solution to many, especially if Chrome continues to gain market-share.

      In the worst case, this could lead to everybody having to implement Dart, and the new de-facto standard scripting language being controlled by Google, who, running several of the world's most popular websites, can hardly be considered neutral.

      --
      # cat /dev/mem | strings | grep -i llama
      Damn, my RAM is full of llamas.
  2. It's not a bad thing by i+kan+reed · · Score: 4, Informative

    The world actually needs more "enterprisey" languages. If you want experimental, fun languages, your choices are actually very good, what with ruby, python, and a ton of functional languages. In terms of safe and good for scalable, risk-averse environments, there's pretty much just Java and C#. Java seems to have accumulated so much inertia, it doesn't add new features anymore. As for C#, the problems dealing with Microsoft are well-known to the slashdot community already.

    A little more competition in that arena would do the industry some good.

    1. Re:It's not a bad thing by wzzzzrd · · Score: 2

      Exactly. In terms of "heavy enterprise", meaning the real back ends of big financial companies, airline conglomerates and insurances...They only let you touch their valuable cobol systems through java, mostly 1.3 (1.4 if you're lucky). The java 5 route (and thus 6, 7, 8) is too risky because of Oracle. Any new development in that sector is good news. Although some java integration is necessary (mostly connectors and MQ systems), because these are tested for 10+ years and that counts more than anything else.

      And no, twitter is not enterprise. You ruby wizards and whatnot-gurus, go bashing google or whatever further down the page.

      --
      On second thought, let's not go to Camelot. It is a silly place.
    2. Re:It's not a bad thing by JustinOpinion · · Score: 3, Interesting

      I agree, but in such cases, isn't the solution to make current "fun" languages more "enterprisey" by improving the back-end toolchain? Disclaimer: I'm by no means an expert (I'm a physicist with a minor in CS, not a hardcore CS person), so maybe I'm way off-base here (corrections welcome).

      Take Python. I love its syntax, the plethora of libraries available, the ability to rapidly prototype and see immediate results. All the things that make it "fun" really do make it productive (shorter time to a final, correctly coded solution). It's a great language. However, it doesn't run as fast as C/C++ code, for obvious reasons (interpreted, dynamic typing, etc.). There are ways to make it faster (rewriting critical subsections in C/C++, using fast libraries intelligently, various optimizers and pseudo-compilers exist, etc.). But everyone (or at least me) would love to code using Python syntax but have the code run as fast as C/C++. Best of both worlds.

      In other words, what I would love to see is tons of effort put into making toolchains for making Python (or other "fun" languages) faster (and probably by association more enterprisey in terms of being type-safe, etc.). I'm not saying doing this would be easy, but there are various proofs-of-principle for compiling Python code or automatically converting it to C/C++ code and whatnot. It could be done and would allow programmers to use the clean syntax of Python to more rapidly code a project without feeling bad about the performance not being up to scratch.

      Again, I'm aware of the alternatives (rewrite bottlenecks in a fast external, etc.). But it seems to me that we've learned a lot about what makes for a nice high-level syntax, so we should automate the grunt-work of converting that syntax into fast low-level code. (Yes, I'm aware of gotchas such as dynamic typing preventing full compiling in some cases, but something like adding type hints to a high-level language would surely be less onerous for programmers than going to a lower abstraction level wholesale. Even type hints could be automatically inferred by a parser in a lot of cases, with a programmer checking that they make sense...)

    3. Re:It's not a bad thing by squiggleslash · · Score: 2

      Well, that explains the state of the economy.

      --
      You are not alone. This is not normal. None of this is normal.
  3. Bad article and summary by fnj · · Score: 2

    Both the article and the summary don't seem to get it. This sounds like C#.NET take two, with the added trick that until browser support for the real Dart is there, you can deploy by translating your client side Dart code to JavaScript.

  4. That's actually very good! by goruka · · Score: 2, Insightful

    The main problem of Java and C# is that they are controlled by Oracle and Microsoft respectively, both of which have repeatedly shown to not play nice with the open source developer community, have used patents aggressively and care very little for open standards.
    Even mono is not open enough to allow usage in many embedded devices (read: game consoles) without paying royalties, due to the GPL license.
    A replacement for those that is portable, can be used everywhere, is easy to migrate to and is distributed by the very permissive licenses Google always utilizes sounds extremely good in my view, so I think the negative tone of the summary is misplaced..

  5. Re:Could be really cool in about 5 years or so. by The+MAZZTer · · Score: 2

    It can be cross-compiled to JavaScript. So every browser will be able to support it right off the bat. Of course it would be slower than native Dart support.

  6. Why is JS compiling ominous? by AC-x · · Score: 2

    but ominously, it also has a tool that converts Dart code into JavaScript

    No, that's an excellent feature. Allows us to start developing sites with this new language without having to wait for all browsers to upgrade or to have plugins installed. How else would you get any sort of main stream takeup of a javascript replacement?

  7. Re:In short by wzzzzrd · · Score: 2

    ...with first class functions. So it's not java, thanks for playing.

    --
    On second thought, let's not go to Camelot. It is a silly place.
  8. Whoa there by SuperKendall · · Score: 4, Insightful

    The main problem of Java and C# is that they are controlled by Oracle and Microsoft respectively

    But Dart is controlled WHOLLY by Google. Why is that really any different or better?

    The reality for Java is much better, it's controlled by a community standards body (the JCP). Oracle can provide direction but they are NOT in control the way Microsoft and Google are.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Whoa there by caywen · · Score: 2

      That's what Microsoft did with C# and the CLI, too. Either we believe that our open standards bodies are real, and that standards are indeed standards, or we believe that they are corruptible by corporations and nothing is actually standard, or we believe that somehow Google is an incorruptible paragon of holy perfection.

      I understand the reasoning behind the first two. I think the third might indicate substance abuse.

    2. Re:Whoa there by Raenex · · Score: 5, Informative

      The difference is that Google have pretty much a clean track record when it comes to open source software.

      I don't think so. Chrome was marketed as an open source browser, yet from the very first release they added in proprietary bits without source code. It's nice that it is almost open source, and that Chromium exists, but it's important to note they compromised on open source principles.

      This continues now with Android, with Google releasing Honeycomb for their partners without releasing the corresponding source code. I don't care what excuses Google gave for that, no source code is no source code.

      Google cannot be trusted. They are a big corporation looking out for their own interests. Sure, they play nice for the most part, but many times they don't.

  9. Re:In short by Sunday_Ironfoot · · Score: 3, Informative

    Java = Statically, strongly typed language (like C# .NET) with classical inheritance, compile time safety etc.
    JavaScript = Dynamically typed language with first class functions with prototypal based inheritance, some runtime safety
    Dart = Dynamically typed language with first classes functions, but with some support for static types & classical inheritance, still runtime safety/error checking, no compiling etc.

    Dart is more like JavaScript than Java. It's been touted as a JavaScript replacement, not Java. Although, just like JavaScript and Java, it can be used for more than just browser based client-side web apps.

  10. Closed platforms by Animats · · Score: 2

    The ominous part of that memo is "The cyclone of innovation is increasingly moving off the web onto iOS and other closed platforms." By which they mean iPhone and Android "apps". "Apps" are not a very good environment, and many of them are just web pages with delusions of grandeur. But that they have a payment model, DRM, and give the app distributor absolute control.

    It's all about screwing the end user. "You're the product, not the customer".

    As a language, Dash looks mediocre, as the article points out. "Optional typing", an idea that started with Visual Basic is usually a lose in language design. Statically typed languages have been successful, and dynamically typed languages have been successful, but optional typing is usually an afterthought bolted on to increase performance at the cost of programmer confusion. There's a typed Python variant, for example; PyPy is written in it. It's rarely put in a language from the beginning.

    A few languages have tried a form of soft typing, where you have, essentially,"integer", "real", "boolean", etc., and arrays of same, plus "object". That way you get efficient code for machine arithmetic, which means you can do codecs and graphics in the language. Objects have to be dispatched anyway, so a performance penalty there isn't so severe.

  11. Re:Android? by rycamor · · Score: 2

    Seems to me DART is meant to replace the ubiquitous PHP/Javascript combination. Think about it: quick prototypes with untyped code, moving to static typechecking wherever wanted, Server-side and client-side execution, built-in HTML5 DOM library. Its features may be unexciting, but they could provide an easy escape from PHP/Javascript hell without too much learning curve.

    If that is Google's primary target with DART, it may prove to be a very strategic move.

  12. Re:Android? by DragonWriter · · Score: 2

    No, it's designed to run on web servers. Full Java replacement perhaps, but not J2ME.

    Its designed to run both client-side and server-side.

  13. MIT licensed anylanguageVM by sgt+scrub · · Score: 2

    If Google would have spent time and effort on Parrot or helped to release a VM that interprets multiple languages under the MIT license, I would be loving Google. Another scripting language and VM doesn't make me warm, fuzzy, or even remotely interested.

    --
    Having to work for a living is the root of all evil.
  14. Re:Could be really cool in about 5 years or so. by shutdown+-p+now · · Score: 2

    There are several dozen languages that can be cross-compiled to JavaScript today. So far, none of them have become popular as replacement for JS in the browser.