Slashdot Mirror


Dart 2: Google's Language Rebooted For Web and Mobile Developers (infoworld.com)

An anonymous reader quotes InfoWorld: Google's Dart language, once positioned a potential replacement for JavaScript in the browser, is being rebooted for client-side web and mobile development in Version 2 of the language. A beta version is now available. Dart 2 features a strengthened type system, a cleaned-up syntax, and a rebuilt developer tool chain.

Dart has a succinct syntax and can run on a VM with a just-in-time compiler, with the compiler enabling stateful, hot reload during mobile development. Developers also gain from fast development cycles where code can be edited, compiled, and replaced in apps running on a device. Compiling code ahead of time provides fast startup, Google said. Dart can be compiled to native code for ARM and x86 platforms. Google has used the language to build applications for iOS, Android, and the web.

23 of 44 comments (clear)

  1. Spoiler Alert! by Gravis+Zero · · Score: 1, Funny

    It still sucks.

    --
    Anons need not reply. Questions end with a question mark.
  2. What was wrong with JavaScript... by The+New+Guy+2.0 · · Score: 1

    Back in the old days, things like ActiveX and Java forced web users to need a specific browser to see some sites. JavaScript is now implemented fully across all known browsers, so how does Dart become better enough to be worth implementing outside of Chrome?

    1. Re:What was wrong with JavaScript... by skoskav · · Score: 3, Interesting

      I disagree with your premise that JavaScript is "implemented fully across all known browsers," as it's effectively a living standard where browser vendors implement the parts they can be bothered to.

      As Dart for now is still transcompiled to JavaScript, it's realistically more of a competitor to the likes of TypeScript and CoffeeScript. With Dart 2 switching to a mostly mandatory type I hope it catches on this time, as I remember it being a lot of fun to code in.

    2. Re:What was wrong with JavaScript... by jma05 · · Score: 1

      No one is using Dart to run inside a browser anymore. That idea predictably met the same fate as ActiveX or even Applets.

      People are however using it as:
        - A better Typescript to generate Javascript.
        - A better node.js on the server side.
        - A Java/Kotlin/Objective C/Swift alternative for writing cross-platform mobile apps.

      It is fine for what it does. There is hardly any learning curve. Think of it as Google's Java/C#, because Oracle was giving them grief over Java.

  3. Re:Would not adopt it by The+New+Guy+2.0 · · Score: 1

    Google seems to have invented everything it can invent, which is why the GOOG/GOOGL stocks were switched over the Alphabet Inc. which holds Google, YouTube, and X projects under one stock roof. The founders sound more fun working for the other companies they started, so Google seems to be missing that brainpower.

  4. Re:bro code by The+New+Guy+2.0 · · Score: 1

    Sexual harassment at Google is about 2-3 stories down from here...

  5. What ? This is an article about programming by Crashmarik · · Score: 1

    How did it get here ?

  6. Too late! by Anonymous Coward · · Score: 1

    Sorry guys, I'm afraid it's too late to try it out. Google has marked it as end of life. Good news though: I know from inside sources that they're about to unwrap its replacement very soon. Expect an announcement from Google in the next few weeks.

  7. I'll sit this one out by flargleblarg · · Score: 1, Funny

    I'm waiting for the LawnDart scripting language that sits atop Dart.

    1. Re:I'll sit this one out by MichaelSmith · · Score: 1

      SpaceX and Tesla will jump on that one.

  8. Flutter by jma05 · · Score: 1

    I should add: The killer framework for Dart is Flutter.

    Flutter is the most modern cross-platform mobile framework yet.

    - The API is very high level (component oriented). Very easy to pick up.
    - The tooling is the best there is. Hot reload is fantastic. Only WYSIWYG editors are missing, but UI design is just editing component trees.
    - Not a Javascript hybrid framework.
    - Native compilation.
    - Talks to the platform API, although a bit clunky on that front.
    - Google's framework (This may be a con for some).
    - Free.

    Cons:
    - Still not 1.0 yet.
    - Uses its own rendered widgets that look very native, but could fall behind if Google does not keep up.
    - 8 MB runtime with slightly slower startup compared to native - probably no different from other third party frameworks like Xamarin.

    1. Re:Flutter by sg_oneill · · Score: 1

      Flutter is the most modern cross-platform mobile framework yet.

      - The API is very high level (component oriented). Very easy to pick up.
      - The tooling is the best there is. Hot reload is fantastic. Only WYSIWYG editors are missing, but UI design is just editing component trees.
      - Not a Javascript hybrid framework.
      - Native compilation.
      - Talks to the platform API, although a bit clunky on that front.
      - Google's framework (This may be a con for some).
      - Free.

      So..... basically ReactJS, with a proprietry moon language thrown in, and no JSX?

      Seriously dude, Flutter is only "modern" if you havent kept up with what the rest of the world is actually doing.

      --
      Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
    2. Re:Flutter by jma05 · · Score: 1

      I have kept up.
      Watch any short tutorial on Flutter on Youtube. It is not a complicated framework to understand.
      It is quite different from ReactJS and other hybrid approaches.
      It is conceptually closer to Embarcadero's (Delphi) proprietary FireMonkey framework. Both use rendered widgets with a GPU accelerated backend.

    3. Re:Flutter by angel'o'sphere · · Score: 1

      Wow, that was an interesting hint.
      As I'm not into platform depending code but also not into JavaScrip based frameworks.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    4. Re:Flutter by angel'o'sphere · · Score: 1

      Then give some hints, with no links or names of frameworks/languages/technologies your post is pointless.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    5. Re:Flutter by sg_oneill · · Score: 1

      It is conceptually closer to Embarcadero's (Delphi) proprietary FireMonkey framework. Both use rendered widgets with a GPU accelerated backend.

      So by "modern" we're talking about 90s technology rebranded for the web age?

      Because while the old delphi component model was convenient (And I say this with the utmost respect, I spent 15 years as a delphi coder), it lead to some seriously unmaintainable code that modern techniques like the MVC frameworks and even newer ideas like Flux et al sought to fix.

      Or is this one of those things like NoSQL where marketers drag out bad ideas we abandoned in the 80s and 90s, and sell them again as the next big thing because most coders are too young to remember why it was a bad idea in the first place?

      --
      Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
    6. Re:Flutter by jma05 · · Score: 1

      > So by "modern" we're talking about 90s technology rebranded for the web age?

      No, we are not.

      > Because while the old delphi component model was convenient

      We are not talking about the "old" Delphi. We are talking about modern Delphi.

      Once again: take a look at some video tutorial. 30 min will give you a reasonably good idea of what it is. You think Dart is a "proprietry (sic) moon language". It is BSD.

      You seem to have used VCL, but not much of FMX. FMX has better fundamentals for a fragmented computing platform era and has better data binding ideas, but got the initial bad rep since the implementation was not up to the mark early on. So you probably are viewing things in that light. BTW, I do not use Delphi ATM but might pick it up again in the future. Yes, it has its own flaws like everything else.

      Flutter has MVC and React concepts as well.

      > Or is this one of those things like NoSQL where marketers drag out bad ideas we abandoned in the 80s and 90s

      NoSQL is good for what it is. Yes, it was oversold and poorly-defined. I have built apps where NoSQL was significantly better performing (this was for read-only data where a relational architecture would involve too many lookups. The data was updated in bulk very infrequently, but needed very quick responses). I benchmarked it against an RDBMS for my scenario before choosing it. You choose by metrics. NoSQL is such a loosely defined term, that we can mean very different things from it It is foolish to put graph data in a relational model, for instance.

      Yes, don't jump thoughtlessly into the bandwagon, but don't fear new things either.

      I actually would argue that we have taken a step back with modern development. Native RAD that Delphi offered is all the more important for the mobile era. Yet, we devolved into this: Let's pack an entire, separate bloated web browser engine into the simplest web app kind of paradigm. The native options are too platform specific.

      How many good cross-platform, native compiling, GPU utilizing frameworks that look good without you needing to be a designer or spending way too much time to get layouts right? How many of them don't bog you down with slow compiles (Delphi with FMX was horrible at this when targeting Android).

      Delphi and C++ Builder did good RAD because Borland tweaked the language for the needs of the framework. Google is using Dart in the same way. This article is about some new features they introduced to make Flutter code look leaner.

      Of course, modern tools unsurprisingly do some things better than the original Delphi. Why would they not? It has been over 20 years since that model. But they also surprisingly do a lot of things worse.

  9. Re:Fuchsia by Anonymous Coward · · Score: 1

    Actually, that's not quite true. Fuchsia uses Flutter and Dart for the UI layer. https://www.cultofmac.com/4423...

  10. A comparison with typescript and ES7 by zaphirplane · · Score: 1

    Would be nice to sell the language a bit with a comparison with typescript and es7, unless itâ(TM)s just a click bait hey look the big G has something that is interesting because itâ(TM)s by google

  11. Google might have missed an opportunity with Dart. by Qbertino · · Score: 2

    As far as JS-transpiled PLs go, Dart is actually one of the more interesting onces. However, as it looks, Google might have missed an opportunity with Dart. Too much of a niche product with no serious support. Curiously enough, it's Microsoft leading the game in this area with TypeScript and a nigh perfect FOSS toolchain accompaning it with the very neat Visual Studio Code IDE being written in TS and offering all-out support for development in TS. ... Yeah, and hell froze over a little more lately.

    If Google proves they're serious with Dart 2, they might have a chance, but right now I'm betting on TypeScript for my transpilation/large-js-project needs.

    --
    We suffer more in our imagination than in reality. - Seneca
  12. web design by oloutt · · Score: 1

    Thanks a lot for this thread! The resources like https://studioblackbelt.com/ can make you can learn all the skills you need to start making money on the web by creating websites. This is an essential site every web designer should bookmark

  13. Why was parent post voted down? by walterbyrd · · Score: 1

    Even if you don't entirely agree, you have to admit, the guy has some valid points.

  14. Re: Would not adopt it by micahraleigh · · Score: 1

    React has better adoption. While it's worth noting Angular is supported indirectly by Microsoft since they publicly support Angular ... the Microsoft guys I know are all doing React at work. So it doesn't really have as much support as React.