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.

44 comments

  1. Would not adopt it by Anonymous Coward · · Score: 0

    Given Google's record with how quickly and arbitrarily it abandons tech it introduces, I wouldn't touch Dart.

    Google seems to equal junk these days. Angular, anyone? Which version?

    1. Re:Would not adopt it by Anonymous Coward · · Score: 0

      Their frameworks are an attempt to utilize their leverage with the internet to alter the core which is javascript a free and open source language into proprietary frameworks.

      The trap is not a particularly hard one, label it open source, get their developers to utilize it on a few projects such that it gains recognition and traction with new developers who are eager to learn something of value in the market. Once enough of the world is utilizing the project it then forks from open source to closed source and requires a license and payment for use, those developers attempting to continue with the free lunch are taken to court where they will summarily lose and relinquish money. The key is to ensure that you have enough devs in the trap before you close it.

      At all points a corporation originating from the united states will attempt to extract money, it is their purpose goal and legal obligation which gives society a choice between accepting and rejecting. They will utilize any tactic to ensure that rejection is not an option or is the lesser option.

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

    3. Re:Would not adopt it by Anonymous Coward · · Score: 0

      Why so. They can control the open source project forever and host whatever files and libraries on their CDN (collecting data on everyone loading library foo). See Chromium and Android AOSP : these are code dumps and 99% end users use the proprietary or finished freeware/spyware version anyway.

    4. Re: Would not adopt it by Anonymous Coward · · Score: 0

      I stopped using Angular since they abandoned JavaScript. Fuck them.

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

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

    It still sucks.

    --
    Anons need not reply. Questions end with a question mark.
    1. Re:Spoiler Alert! by Anonymous Coward · · Score: 0

      Bummer. It's only job was to suck slightly less than js

  3. 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:What was wrong with JavaScript... by Anonymous Coward · · Score: 0

      so how does Dart become better enough to be worth implementing outside of Chrome?

      It doesn't. Even the Chrome developers aren't interested in including a Dart VM and, at this point, the language exists solely because of the AdSense team since they're basically the only ones using it. It's a bog standard object oriented language that won't even be statically typed until the upcoming version 2. Like Java and C#, it suffers from braindead variance issues and ridiculous problems like all references being nullable. Java and C# at least have the excuse that they're restricted by backwards compatibility and many of the problems weren't nearly as well understood when they were released. Dart has no such excuse.

      A lot of the problems with Dart are exacerbated because it's primarily used for client side web application development and its "new" static type system isn't powerful enough to express a lot of common JavaScript idioms. This makes interop with JavaScript libraries a pain in the ass and a common source of bugs. Typescript has similar issues and it's type system is a lot more powerful than Dart's. Furthermore, if WASM takes off why would anyone choose Dart over any of the far more popular alternatives?

  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. No Web Assembly? by Anonymous Coward · · Score: 0

    Dart seems like an improvement over the mess of pre-ES6 Javascript. However, as more browsers support ECMAscript v6 changes, the improved readability of Dart would be less of a selling point. If Dart also supported producing Web Assembly (WASM) so it could be used as an alternative to enscripten, then I would probably consider using Dart.

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

    How did it get here ?

    1. Re: What ? This is an article about programming by Anonymous Coward · · Score: 0

      LMAO. How is this news?

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

    1. Re:Too late! by Anonymous Coward · · Score: 0

      Good news

      Google News will be retired one week from now, didn't you know yet?

  8. Fuchsia by Anonymous Coward · · Score: 0

    Fuchsia uses Go and Rust.

    If Dart had any chance, perhaps Google would have used it for something.

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

  9. Re:bro code by Anonymous Coward · · Score: 0

    I don't want to walk in on them...

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

  11. Weâ(TM)re hiring by Anonymous Coward · · Score: 0

    We are looking to hire a software developer with 5 years experience using Dart 2. If qualified email your resume to sarcasm.

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

  13. Sweet by Anonymous Coward · · Score: 0

    Dart is seriously underrated. It is one of the cleanest languages I've seen.

  14. Re: bro code by Anonymous Coward · · Score: 0

    I wear a ski mask when I slap stupid unsuspecting lesbian bitches. Then I quickly retreat and no one sees me. Good time at stupid Google.

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

  16. 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
  17. XKCD by Anonymous Coward · · Score: 0

    https://xkcd.com/927/

  18. Re:Google might have missed an opportunity with Da by Anonymous Coward · · Score: 0

    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.

    TypeScript feels very much like the extend part of the embrace, extend, extinguish strategy.

    Microsoft technologies are like The One Ring, they serve no other master. They should be cast back into the fiery chasm from whence they came.

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

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

  21. Re:Google might have missed an opportunity with Da by Anonymous Coward · · Score: 0

    Microsoft has always had the most developer friendly tools and has been leading the pack in this regard for a very long time.

    It's just that you've been full of shit your entire career.

  22. Wow. by Anonymous Coward · · Score: 0

    You sure have a tenuous grasp on reality there.