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."

5 of 219 comments (clear)

  1. 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 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...)

  2. 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 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.

  3. 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.