Slashdot Mirror


More Info On Google's Alternative To JavaScript

I'm Not There (1956) writes "Last week the news came in that Google is supposed to unveil 'Dart,' a new programming language for browser-based apps. Now an internal email from late last year describes this project as the 'high risk/high reward' path [of Google's browser development strategy]. Apps in this new language will run in a VM on browsers that support it, and can be translated to JS for other browsers. 'Performance, developer usability, and ability to be tooled' are the main characteristics of the language." The email notes that Google will be working on ECMAScript Harmony in the near term, but they describe the project as ultimately doomed by "fundamental problems" with ECMAScript. It's interesting that Google took part in abandoning ECMAScript 4, which would have been almost fully backward compatible with current implementations while solving most of the "fundamental problems" Google claims require a brand new language to fix.

35 of 247 comments (clear)

  1. they should just create GLang by alen · · Score: 2

    and make you code anything for their services in GLang so that they will be their own part of the internet separate from the open one

    1. Re:they should just create GLang by North+Korea · · Score: 2

      Yep, pretty much like they did with Google App Engine. Lock the developers down first, then raise prices significantly. Oh, and since it's unique platform and the backend is closed, you either have to accept whatever price Google is asking or abandon the project and code it again from the beginning. So much for Google's openness. Their new business motto seems to be borrowed from Microsoft - "Embrace, extend and extinguish".

    2. Re:they should just create GLang by North+Korea · · Score: 2

      Now I know you're either utterly fucking retarded, or really just shilling for one of Google's major competitors. You don't need to know the backend to port your project. All you need to know is the APIs of the new system, and do some work. Just like for every other platform project. Don't like it? Write your own platform.

      And would you say this same thing about Microsoft and their Office file formats? "Don't like MS Office file formats? Write your own and don't support them!" Google has seriously brainwashed you. They do all the same bad things Microsoft, Facebook and many other "bad" companies do but you're too clueless to see it.

    3. Re:they should just create GLang by mjtaylor24601 · · Score: 2

      Oh, and since it's unique platform and the backend is closed, you either have to accept whatever price Google is asking or abandon the project and code it again from the beginning.

      WTF are you talking about? According to the documentation

      "App Engine uses the Java Servlet standard for web applications. You provide your app's servlet classes, JavaServer Pages (JSPs), static files and data files, along with the deployment descriptor (the web.xml file) and other configuration files, in a standard WAR directory structure. App Engine serves requests by invoking servlets according to the deployment descriptor."

      "Apps can use the App Engine datastore for reliable, scalable persistent storage of data. The datastore supports two standard Java interfaces: Java Data Objects (JDO) 2.3 and Java Persistence API (JPA) 1.0. These interfaces are implemented using DataNucleus Access Platform, the open source implementation of these standards."

      Granted not all features of JDO or JPA are fully supported and there are other services such as URLFetch that you can choose to use which won't be portable, but if you have even half a brain when designing your application you'll hardly have to "code it again from the beginning" if you want to move to a different host.

      --
      I wish I were as sure of anything as some people are of everything
  2. -yawn- by Aladrin · · Score: 4, Insightful

    Until I actually get my hands on the language, no amount of hype is going to do anything for me.

    Besides which, CoffeeScript has got to be stealing their thunder. I have to wonder if they aren't regretting developing Dart yet.

    --
    "If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
    1. Re:-yawn- by mortonda · · Score: 2

      Tell that to python. It seems to have maintained a pretty good success with that. (for the record, I don't like python)

  3. Re:Yikes by JonySuede · · Score: 2

    at least Go has a better syntax than Haskell ;)

    --
    Jehovah be praised, Oracle was not selected
  4. Editorial Piece Angries Up My Blood by eldavojohn · · Score: 4, Insightful

    It's interesting that Google took part in abandoning ECMAScript 4, which would have been almost fully backward compatible with current implementations while solving most of the "fundamental problems" Google claims require a brand new language to fix.

    Yeah? How many free license programming languages have you released and continued to support?

    As a developer, I love to learn a new language. I write a few simple programs in the new language. I explore what advantages and disadvantages that language has and then I put it in my toolbox. If a problem comes along that I must fix, I select the best tool for the job from said toolbox. I don't know how any sane developer could get by any other way -- there is no silver bullet programming language.

    The more tools I have at my disposal, the more effective I am. So shut your hole. I don't want people to stop exploring new languages just because it hurts your feelings that the market might fracture and you might have to -- *gasp* -- learn something new!

    --
    My work here is dung.
    1. Re:Editorial Piece Angries Up My Blood by gbjbaanb · · Score: 2

      Rubbish attitude - this is why software is regarded as a 'hobby' for inexperienced and generally poor developers - you're too busy 'learning something new' all the time and not focussing on getting things done.

      The software industry will never become as established and professional until this attitude disappears, we need masters of things, not continual change to something else.

      Now, I don't have too much problem with a new language, but the bar for adoption really needs to be set very high to avoid the "change for change's sake" problem I just described. I think js is relatively poor, performance could be a lot better, and there could be a web-client language better geared towards IO, text parsing and GUI development. If this is it, then we'll see - but at the moment, its just hype and vapourware. If you really need something new, go for Google's native client and get that better supported across browsers and platforms.

    2. Re:Editorial Piece Angries Up My Blood by Anonymous Coward · · Score: 4, Funny

      You just have another half-assed way of raping the hardware

      Nah sugar, its not like that. My software takes your hardware on a smooth journey through vermont's verdant landscape, over covered bridges, skiing in the Alps, before ascending to the heights of Kilimanjaro before leaving this planet in our own space ship destined for planet love. You've got twelve cores,honey and I'll caress each one lovingly as I romance your pci flash.

    3. Re:Editorial Piece Angries Up My Blood by Kjella · · Score: 3, Interesting

      The problem with the toolbox analogy is that your screwdriver never has to interact with your hammer. Software code on the other hand is notoriously bad at working with code from other languages, sure there's language bindings and and various ways of making them somewhat talk to each other but the cost of mixing languages is huge. It's more like building bits and pieces of the system to work on optical signals and the rest on electrical signals, not like pounding one nail and screwing one screw into a board.

      It's very rarely you need a programming language to do just one thing, maybe they go into specialty or research projects but anything commonly used has to be a swiss army knife. Most of the time you want to ask "Can I add another tool to this knife?" not design an entirely new dedicated knife for that purpose. There's a place to mix products for a "best of breed" solution, but languages are not it. Your narrow choice of language is likely to fail as the project expands and it really needs other sets of functionality.

      If you want to see a prime example of that, look at VBA projects that have run out of hand. Quite probably it wasn't such a bad choice for the original task, just tack on this little bit to Excel and it works. Then it grows and grows and all those limitations get very limiting and you're forced to rewrite everything. That's what happens with other narrow languages too, if you go beyond that scope it's very good at things falls apart. Not to mention all the indirect effects like the available employee pool and the complex skills required to take over.

      That is why there's a very significant drop-off in languages. I'm not saying you should try making a square peg fit a round hole, but very often the languages you, the team and the company knows and is familiar with beats trying to get everyone up to speed on a new language. But that goes for everything, should you work within the system to improve it or outside the system to overthrow it. I guess it all depends on how broken the old system is but people have a tendency to idealize the system on the drawing board.

      --
      Live today, because you never know what tomorrow brings
    4. Re:Editorial Piece Angries Up My Blood by Sleepy · · Score: 2

      No one has decreed that Dart must exclude Javascript, nor has anyone suggested that IPv6 engineers have been taken away from their pressing task to work on Dart. Your arguments are all false arguments, crafted to support your initial reaction but not really relevant to the issue.

    5. Re:Editorial Piece Angries Up My Blood by __aajfby9338 · · Score: 2

      The problem with the toolbox analogy is that your screwdriver never has to interact with your hammer.

      If your screwdriver came with a lifetime warranty, then it is a hammer.

  5. Re:It isn't really interesting by bluefoxlucid · · Score: 3, Insightful

    Let's skip the ass dance and hear what these fundamental problems are, and how to solve them.

  6. Lua would be better by Anonymous Coward · · Score: 5, Interesting

    Lua is very Javascript-like already except it's very small, simple, clean, and fast. Much faster; LuaJIT is incredible.

    1. Re:Lua would be better by kripkenstein · · Score: 2

      Lua is very Javascript-like already except it's very small, simple, clean, and fast. Much faster; LuaJIT is incredible.

      LuaJIT is not much faster anymore.

      LuaJIT gets to about 2-3X slower than the fastest gcc, while the latest JS engines (V8 with CrankShaft, SpiderMonkey with TypeInference) get to 3-5X slower than gcc. That's still a significant difference, but the JavaScript engines are also improving faster. In a year or so the difference will have vanished.

      Those numbers are also a little misleading. They are mainly simple benchmarks, where LuaJIT's tracer is phenomenal. But if you take a complete program, with a lot of use of classes/inheritance/closures/etc., LuaJIT won't do as well - it hasn't been tuned for those things. In other words, on real-world code the difference would be nonexistent or even reversed. But what is representative 'real-world code' is debatable so it's hard to come up with numbers for that. (But you will often see it in practice in the field.)

  7. And when JS suddenly seems viable by slim · · Score: 5, Interesting

    It's interesting that this should come about when Javascript seems (to me) to be undergoing quite a surge.

    The community has carved out a set of practices that makes Javascript pretty satisfying to work in -- Crockford's efforts, the require/export conventions etc.

    Callback oriented programming habits learned in the browser with jQuery (etc.) have shown that Javascript lends itself quite well to that style of programming. Underscore has promoted a functional style.

    Node.js seems to be more popular than forebears such as Twisted, presumably because of all those JS-in-the-browser programmers who can apply their callback habits to Node.

    CoffeeScript is there for people who want a more expressive syntax. ... and just as people are coming around to the idea that JS isn't that bad after all, Google says "nah, it's irredeemable"

    1. Re:And when JS suddenly seems viable by Sancho · · Score: 2

      Whether or not Google's problems with Javascript are reasonable, it's perfectly understandable that now is the time that they would start caring so much about the future of JS. We're starting to really push the envelope, and when you do that, the shortcomings often rear their ugly heads much more dramatically.

  8. Dart or Dash? by Eraesr · · Score: 2

    So what is it going to be called? Dart or Dash? The email refers to it as Dash while the older articles refer to it as Dart. It's going to be Dash then, I assume, if Google internally refers to it as Dash?

  9. Brightly by I'm+Not+There+(1956) · · Score: 2
    Forgot to mention Brightly in my submitted story! This part is FAQ of the email is interesting:

    How does this affect our cloud IDE (Brightly)?

    Brightly will enable building any web application in V1 using today’s Javascript plus the additions in Harmony. As soon as it is ready, Brightly will support Dash as well. We expect that the more prescriptive development aspects of Brightly that will come on line in the future will be more Dash focused.

    We expect Brightly itself to be the first application written in Dash.

    --
    "If fifty million people say a foolish thing, it's still a foolish thing."
  10. Re:Yikes by ZankerH · · Score: 4, Funny

    Haskell has syntax?

  11. Does Backwards Compatibility Matter? by OG · · Score: 2

    The whole point of the "type" attribute in the script tag is that a browser can support multiple scripting languages. The introduction of Dart wouldn't necessitate dropping JS for the browser, but if other browsers implemented it (or Google created extensions for other browsers), it would provide an alternative.

  12. Makes sense by Concern · · Score: 4, Interesting

    Javascript is something of an accidental success. As with many languages before it, its users valiantly cope with its flaws and do their best to dress up the squalor they live in, but it's not funny for Google anymore. They have to develop, maintain, and test one of the largest JavaScript codebases in the world, and the it's-the-90's-and-I'm-high-on-cocaine-at-4am-and-it's-due-tomorrow scripting language design philosophy is not helping them. In fact the story of the last few years has been the quiet proving out of the "extra keystrokes for correctness" paradigm, from simple assertions (including "type assertions" aka good old fashioned strong typing) to unit tests to highly complex integration tests of harrowing complexity.

    If I understand correctly, Google already writes much of their JavaScript in an intermediate language that adds certain features. They have long needed a compile step anyway for compression/"obfuscation" and I suspect it was a natural outgrowth of that. This appears to be another step in the evolution of that development pipeline.

    There are many interesting developments brewing in the browser these days. I wish the browser guys luck, because I think have just a little longer to get their act together before the world gradually changes out from under them, and a purpose-designed, clever, far more powerful platform, such as Android or iOS, might actually start to change the web browser's position in the computing ecosystem. A modern scripting language is only part of the price of admission to staying relevant as a platform.

    --
    Tired of Political Trolls? Opt Out!
  13. Re:What exactly is wrong with javascript? by NoNonAlphaCharsHere · · Score: 4, Insightful

    Javascript is a language that combines the type-safety of Perl with the object paradigm of pre-ANSI, pre-STL C++, the power and expressiveness of Visual Basic, the ambiguity of HTML, and the readability and maintainability of C.

  14. Re:It isn't really interesting by kill-1 · · Score: 2

    The "fundamental" problem from Google's perspective is Javascript's lack of typing. They want a language with optional typing and think that the ECMAScript 4 route isn't viable.

  15. Well You're Missing Out, Man by eldavojohn · · Score: 2

    Rubbish attitude - this is why software is regarded as a 'hobby' for inexperienced and generally poor developers - you're too busy 'learning something new' all the time and not focussing on getting things done.

    I don't know what to say other than I feel really sorry for you if you're a developer. I grew up coding C/C++ and had I only had your attitude, I never would have used LISP, PROLOG, Java, Ruby, etc. Could I be some badass C/C++ developer if I had never been "sidetracked" and "not getting things done"? Maybe.

    But -- at the risk of being modded down as a shill -- I submit to you a recently launched site I coded with a friend. He did the canvas stuff, I did the backend. I could have picked any solution out there but I ended up going with Ruby on Rails. Is it slow? Yes, compared to C/C++. Is this a super complex site with massive usage? Well, not really. That's what made Rails a great choice. I haven't earned a dime on this project (we decided against ads). But guess how much time I put into making that backend? About 15 hours. I think I spent more time trying to figure out how the host allows me to manage my gems in Rails 3 than I did actual coding. I didn't even reuse a login module from my other sites. Hell, that was all pretty much from scratch aside from Rails 3 and jQuery.

    Now, I know how to do this in Java, PHP, C++ and even Clojure. It's essentially a RESTful interface for particular CRUD operations. But could I have done all that in 15 hours if I had selected another technology and framework? I don't think so.

    "change for change's sake"

    I don't understand where you thought I said I now do all my development in $LANGUAGE_OF_THE_WEEK. There are now more tools in my toolbox. If I pick a different tool next time, I'm going to have a reason for doing it. In the above case, the prototyping time was far less in Rails.

    If you really need something new, go for Google's native client and get that better supported across browsers and platforms.

    Forgive me if I see this as directly opposed to your opening sentence. Tell me, what makes a new technology "noble" enough for your attention? How do you know NaCl won't flop?

    Regardless of how you see it, I with my "rubbish attitude" and "inexperience" and "poor development" and inability to get things done am doing quite well in the job market ...

    --
    My work here is dung.
  16. Re:It isn't really interesting by mmcuh · · Score: 2

    Why are they inventing a new language if all they want is typing? Just use C, compile it to bytecode and run it in a sandbox. It has the added advantage that every programmer on earth already knows it (no, someone who doesn't know C is not a programmer).

  17. It doesn't matter by optymizer · · Score: 2

    All languages are syntactic sugar for the IR code that gets generated. Fundamentally, all compilers translate from a Source language to a Target language (machine language in a lot of cases).

    Whether the compiler checks that the types match, that there will be overflow, that you're doing signed vs unsigned comparison - it's up to the compiler and its developers. Clearly, one compiler can have more features than the other one. To access those new features, the compiler needs to see syntactic constructs in the source code. If you can't extend Javascript (or it's not feasible, or you just don't want) to incorporate those syntax changes, you can always develop a new language, such as Dash (or Dart?), with the risk that it will fail, but with the opportunity of fixing the bad things in Javascript and add the features that you want.

    This is just a natural way of language evolution (in the broad scope of translating source code to machine code). You can't anticipate all the requirements of the future, so you design a language that solves all previous problems (or a relevant subset) and the current ones. In time, it will become obsolete, as people will build on top of your language to solve the problems they'll face at that point in time.

    Obviously, everyone hates change. I say: Give it a shot! At least don't dismiss it till you've looked at it and figured out how it may or may not help you. If it doesn't, stick with what works for you. If it does, hey, you're now better off. Chances are, people aren't wasting their time to develop a new language, unless it solves someone's problem (their problem, your problem, everyone's problem - depends on the goals of that language).

    I, for one, always welcome a new programming language, just to see what it brings to the table.

  18. Sick of "Google is Evil" claims by Enderandrew · · Score: 5, Interesting

    Google is not evil points:
    * Google massively supports open-source software
    * Google pushes for open standards rather than lock-in
    * Google has fought for the defense of fair use
    * Google has fought for net-neutrality
    * Google provides free services
    * Google is wiling to take a loss on products to provide these free services
    * Google allows you to easily export your data from their services, and even fully delete your online data/profiles
    * Google is the cloud services provider that doesn't claim to own your data
    * Google is running a test in Kansas of gigabit internet for the whole town and another test of free city-wide wifi.
    * Google is the only search company to fight censorship in China
    * Google is the only search company that refused to hand over user data to the Bush Administration
    * Google fought Brazil as well to protect user data
    * Google developed an open-source phone platform and has been encouraging handset manufacturers to open up and let consumers flash custom roms

    Google is evil points:
    * The Google Map street view team recorded data on open wifi networks. If people didn't want anyone to know you have a wireless network, you can turn off broadcasting the SSID.
    * Google eventually caved/compromised on one portion of net-neutrality. They have a joint proposal with Verizon that would ensure the internet itself is protected by net neutrality, but wireless phone providers would be allowed to provide unique content and services. Is this really all that evil of a compromise?
    * Google hasn't released the source code of Honeycomb because they don't want the market diluted with phones with a bad phone stack, but has promised to release the source code of Ice Cream Sandwich when it comes out in October/November. Man, that really is evil!

    Seriously, the assumption that Google must be evil just because they are a big corporation is a flawed, simplistic view. I'd rather judge them on their actions. And according to their actions, they are the only major IT company out there I would trust given that my alternatives are Microsoft, Amazon, Facebook, Apple, AOL, Yahoo, etc.

    --
    http://blindscribblings.com - Tasty pop-culture in conceptual fashion.
    1. Re:Sick of "Google is Evil" claims by North+Korea · · Score: 2

      * Google's business model fundamentally relies on violating peoples privacy and selling users private information.

      That is all that needs to be said, even while there's a lot more.

      And seriously, you can make that kind of list of any company, even Microsoft. MS does a lot of cool R&D in Microsoft Research, they give out software freely to students, they give out Visual Studio Express freely, they support charities, and they also massively support open source software outside of their core business.

      Google does a lot of evil things. You can't kill an innocent little girl and get off of it by saying "but look, I also help homeless people by giving them food!". If you do evil, you do evil, and you should be punished for it, no matter if you do good things as well.

    2. Re:Sick of "Google is Evil" claims by The+Moof · · Score: 2

      A lot of your "not evil" points can be offset by the "is evil" point: "Google only does things that are in their business' best interest."

      The whole China thing was a hot mess for Google. They caught a lot of heat because they actually complied with the censorship laws of China when opening up shop over there. If I recall, they didn't start being vocal about the censorship until the whole "Chinese government hacked our e-mails" thing. They are still in China, just not their search.

      Google didn't make Android. It was a project that they acquired when it was near completion.

      And, as someone else pointed out (which goes along with my first point) - Google's entire business model is based around gathering as much information about you and using it for marketing. Some view this as an enormous privacy concern. This is how the cheap/free internet, doing things at a loss, offering free services, etc, is all justified. If you read your EULAs, they spell out that Google is collecting your data and using it for their marketing purposes.

    3. Re:Sick of "Google is Evil" claims by Enderandrew · · Score: 2

      Microsoft has a patent specifically on how to best sell your private data to the highest bidder. I'm trying to find it at the moment, but searching for Microsoft and patents mainly returns results on Novell, Nortel, Android, etc. And why exactly did Microsoft file this patent in conjunction of their purchase of Skype:

      http://www.technewsworld.com/story/72771.html

      And you may want to read these:

      http://articles.timesofindia.indiatimes.com/2011-04-18/social-media/29443159_1_facebook-profiles-status-updates-advertisers
      http://mashable.com/2010/05/20/facebook-caught-sending-user-data-to-advertisers/
      http://www.readwriteweb.com/archives/facebook_sells_your_data.php
      http://www.financetechnews.com/how-facebook-sells-your-personal-info-and-gets-away-with-it/

      --
      http://blindscribblings.com - Tasty pop-culture in conceptual fashion.
    4. Re:Sick of "Google is Evil" claims by Enderandrew · · Score: 2

      They had no choice but to comply with laws, or they wouldn't be allowed to operate in China. But they did their best to circumvent the laws such as redirecting traffic to Hong Kong serves that didn't have to censor results. And any results that were censored flatly said on the page "These search results have been censored." China didn't like that, but it didn't violate the law.

      If you're on the internet, people are collecting your data. One company is open about it, and goes to length to protect your private data. That is decidedly not evil. And again, they're the only company that allow you to remove all your data from their services if you ever want to opt-out.

      I asked Facebook to delete my account and it never went away. They won't remove your data if you want. Though they reserve the right to delete your data against your wishes how they feel like it, such as deleting all photos that were uploaded via Digikam.

      --
      http://blindscribblings.com - Tasty pop-culture in conceptual fashion.
    5. Re:Sick of "Google is Evil" claims by beelsebob · · Score: 2

      Along with the excellent point about their entire business model being built around invading people's privacy, but here's another for the evil list:

      * Funding WikiMapia to drive people to edit their closed maps and directly advertising against projects like OpenStreetMap.

    6. Re:Sick of "Google is Evil" claims by Enderandrew · · Score: 3, Informative

      Not to mention:

      Microsoft censored everything and didn't try to work around it at all. They also agreed to let China have full access to Microsoft controlled email.
      Yahoo handed over email as well, which led to a journalist going to jail.
      RIM hands over messages and email to help put dissidents in jail.

      Google doesn't. Which one do you hear getting called evil each day? Why are the others getting a free pass?

      Stop letting astroturfers win.

      --
      http://blindscribblings.com - Tasty pop-culture in conceptual fashion.