7 ms·
Microsoft shoots down Google's Dart
- masklinn 15y agoWell, duh. They also seem to indicate (in the linked blog post) that they have no interest in the language's syntax evolving (including destructuring assignment or `let` block-scoped bindings)
- jfoutz 15y agoIt's been a looong time since i fooled around with it, but isn't IE the only browser that lets you specify the scripting language in page? I vaguely recall using perl and Windows Scripting Host to do perl in a web page... Perhaps my memory is as fossilized as that tech though.
- ajasmin 15y agoI think their goal was to support any language. Do they still even support VBScript now?
- HnNoPassMailer 15y agoThe article is laughable. Microsoft itself is an important reason to develop Dart to begin with. MS has EEE'd html/js/css with IE 5.5 and up, and developed .NET to offer a competitive (proprietary) platform. We can't use C# although it's open, because MS is acting as a patent troll.
- Delmania 15y agoDo you live in the 90s? If Microsoft attempted to EEE HTML, Javascript, and CSS with IE5+, it's failed miserably, since the usage of both Chrome and Firefox continues to rise while IE stagnates or declines. You only have to follow the development of IE10 to realize the company knows it needs to play nicely with these technologies, whether it wants to or not. Also, .NET was a response to Java, and while Silverlight and WPF were attempts to develop competing technologies to Flash and HTML/Javascript/CSS that also seems to have failed, since HTML and JS are key elements of the Metro UI for Windows 8. In addition, Microsoft's actions against Android, while despicable, are hardly different than what most other tech companies are doing, so it's best to focus on the broken patent system. Finally, C# (and CLI) is a standard owned by the ECMA, so Microsoft can't sue you if you write a compiler and library from scratch.
- HnNoPassMailer 15y agoThat previous attempts failed does not mean they quit trying. IE9/10 does show some goodwill, but also shows the are still in the EEE game. Take for example the hardware accelerated canvas: Several (non-MS) websites had "optimized for IE" marketing campaigns. Such optimization is nonsense when using standards. Also, MS publicly stated WebGL has security problems because of direct access to the shaders. However, they forget to mention Silverlight has the exact same problem. > In addition, Microsoft's actions against Android, while despicable, are hardly different than what most other tech companies are doing, Eh, no. It's true more patent trolls exist, but not many companies in the industry try to enforce software patents. About C#: Microsoft has stated several times that open is not the same as patent-free. They did so in context of Linux/Android, but also in the context of .net. Also, anaylis exist where C# tech is tied to patents.
- Delmania 15y ago> That previous attempts failed does not mean they quit trying. IE9/10 does show some goodwill, but also shows the are still in the EEE game. Take for example the hardware accelerated canvas: Several (non-MS) websites had "optimized for IE" marketing campaigns. Such optimization is nonsense when using standards. Also, MS publicly stated WebGL has security problems because of direct access to the shaders. However, they forget to mention Silverlight has the exact same problem. Cool story, bro. Most people these days either use the browser that comes with the OS, or install the one they want. > Eh, no. It's true more patent trolls exist, but not many companies in the industry try to enforce software patents. Really? Did you forget that Oracle started a lawsuit against Google for the usage of Java within Android? Or how about Apple's lawsuit against Samsung for the look and feel of the Galaxy Tablet? How about i4i's lawsuit against Microsoft? > Eh, no. It's true more patent trolls exist, but not many companies in the industry try to enforce software patents. [Citation needed] From Wikipedia: The C# language definition and the CLI are standardized under ISO and Ecma standards that provide reasonable and non-discriminatory licensing protection from patent claims. You seem to have a hard time differentiating the language, C# from the library, .NET. It's similar to C++ and the STL.
- 15y ago
- mqqq 15y agoAs much as I like google I really don't want to go to yet another language. I rather focus on building content rather than have to maintain my page in dart and in JavaScript because of fragmentation issues.
- kreek 15y agoDart compiles to JavaScript, and the language is pretty standard stuff, if you know any C style language you can pick it up quickly.
- johnbender 15y ago> JavaScript has the classic benefits of an incumbent technology. Programmers are familiar with it... This is only from my own experience but I'm consistently blown away by how little people actually know of JavaScript. Between interviews and looking at samples attached to jQuery Mobile issues all day I get the impression that most people don't know how to use the prototype system at all and generally organize their code as a series of jQuery event bindings. While this isn't necessarily and endorsement of Dart, I welcome anything that can provide/encourage well-known and sane code reuse patterns.
- ahi 15y agoGuilty. Any recommendations for learning? edit: I have the rhino book. I meant, learning alternatives to organizing my code as a series of jQuery event bindings.
- igorgue 15y agohttps://developer.mozilla.org/en/JavaScript https://developer.mozilla.org/en/JavaScript
- catshirt 15y agohttp://documentcloud.github.com/backbone/ http://documentcloud.github.com/backbone/
- johnbender 15y agoYehuda Katz has a nice article on the prototype system that I generally point people to. http://yehudakatz.com/2011/08/12/understanding-prototypes-in-javascript/ http://yehudakatz.com/2011/08/12/understanding-prototypes-in... And the JavaScript Patterns book is a good read to get an overview of what can be done with just JavaScript. If your application is even remotely complex you'll probably end up using something like backbone or sproutcore which provide constructs for organizing your code anyway.
- dmix 15y agoDouglas Crockford is the best JS teacher I've come across. This video series is excellent (and provides a bit of CS history) http://yuiblog.com/crockford/ http://yuiblog.com/crockford/ Also his book, Javascript: The Good Parts
- kodablah 15y agoSaying Dart needs Microsoft adoption is like saying CoffeeScript or GWT needs Microsoft adoption. They all allow JS compilation and the ability to use JS and be called from JS. Google will likely make an IE extension to run Dart natively anyways.
- viggity 15y agoIf it requires my users on a public site to install an extension, I'm not going to use it. case. closed.
- kodablah 15y agoIt wont. No legitimate developer would replace JS with it if that requirement existed.
- eCa 15y agoWhat he said was that Dart will compile into JS. Natively run Dart will (otherwise, what's the point) than the JS it can be compiled into. What I forsee is some kind of conditional that will allow Chrome to run the Dart code, and other browser get served the compiled-into-JS. Demanding an extension installation is a no-go.
- azakai 15y ago> Saying Dart needs Microsoft adoption is like saying CoffeeScript or GWT needs Microsoft adoption. They all allow JS compilation and the ability to use JS and be called from JS. I'm not sure that is the case, because of the native Dart VM. CoffeeScript compiles very straightforwardly into JS, with similar performance to normal JS. But Dart is significantly different, and the Dart VM could be faster than Dart-compiled-to-JS, both because (1) The Dart VM will be optimized for Dart in new ways, and (2) It isn't clear that Dart code will be extremely efficient when compiled to JS. So CoffeeScript adoption needs no support from browser vendors, but Dart, if it is to fulfill its goal of being fast, might need the Dart VM. And that does need browser vendor support.
- CurtHagenlocher 15y agoIt looks like it's really the alternate VM that's being "shot down". After all, the piece goes to the trouble of pointing out that "...transforming compiler libraries like Traceur and CoffeeScript show how syntax additions to JavaScript and even completely alternative syntaxes can be supported in today’s browsers, without changes to the runtime." Disclaimer: I work at Microsoft.
- kodablah 15y agoBut those languages aren't a significant deviation and still require pre-compilation as opposed to runtime cross-compilation to be useful. Dart is a significant deviation and expected to support debugging directly in the language. Similar to developing in GWT, I doubt the JS will really be looked by the developers at once Dart's compiler is optimized more. Also, the VM wouldn't be required, it would just provide performance improvements.
- gcp 15y agoDart is a significant deviation and expected to support debugging directly in the language. This can be done for CoffeeScript et al too - efforts are already underway. Also, the VM wouldn't be required, it would just provide performance improvements. There's just too much embrace-extend-extinguish risk for anyone but Google in that. That's why Mozilla and Microsoft are burning it at the stake.
- munificent 15y ago> Similar to developing in GWT, I doubt the JS will really be looked by the developers at once Dart's compiler is optimized more. Readable, debuggable JS is a high priority for Dart's Dart->JS compiler.
- azakai 15y ago> Also, the VM wouldn't be required, it would just provide performance improvements. I'm curious, is this true? Last I heard, Dart-in-JS didn't enforce types, so integer math could overflow into doubles for example, but the Dart VM did use native types (so ints would not overflow). So the semantics of the language differ in JS and in the native VM, which means the VM doesn't just provide speed, it provides different behavior. Is this no longer the case - are the semantics of Dart-in-JS and in the VM exactly the same?
- rwj 15y agoI was surprised to hear about Dart. A closer look at Google's other new language (Go), shows a statically typed, compiled language that can be safely sand-boxed. For example, look at how Google has included Go in AppEngine. Additionally, there has been work at compiling Go to another project of theirs, Native Client (NaCl). It still seems like this might be a good match.
- jjcm 15y agoMicrosoft has long since lost the ability to shape the face of the web. While they do contribute to w3c here and there, at the end of the day the webkit and firefox teams are going to control where it goes. The question isn't whether or not it has Microsoft's support, the question is whether or not javascript is flawed enough to put the effort needed into releasing a new scripting language engine with browsers. Disclaimer: I work for Microsoft.
- gcp 15y agoat the end of the day the webkit and firefox teams are going to control where it goes. I don't think this is entirely true. IE still has more than enough marketshare to matter. Microsoft embracing some approach, be it a new language, or be it evolving JavaScript, has influences in how likely the efforts of the other teams are to succeed in the marketplace.
- dredmorbius 15y agoAhh ... so the Evil Empire's new tactic for Total World Domination is to deny they have Total World Domination. ;-)
- rbanffy 15y ago> Microsoft has long since lost the ability to shape the face of the web. In a sense, it did. There are tons of IE6 installations in companies that built "web-based" applications that run only on IE6 and they won't upgrade to newer Microsoft browsers soon. OTOH, IE6+7+8+9 still has a huge percentage of the market and some flavor of IE comes pre-installed on about every desktop computer sold and web developers still have to cope with partial or incorrect support for many newer standards.
- rbanffy 15y agoInteresting. This must be a new position within Microsoft - it deviated significantly from the previous Silverlight idea of using C# within an environment provided by a browser plug-in. Now that they discontinued the plugin (was it a month ago?), they feel it's OK to criticize Google's approach.
- rbarooah 15y agoIf they've decided to abandon plugins and proprietary languages in favor of javascript, why shouldn't they feel that it is ok to criticize Google's approach?
- rbanffy 15y agoUsually, when you defend a flawed approach for years and spend millions of dollars on it, it's surprising to see you attack a competitor for following a very similar but slightly less flawed approach, weeks after you partially and not very publicly acknowledge your mistake.
- contextfree 15y agoThey haven't officially discontinued anything.
- rbanffy 15y agoI think they announced the EOL'ing of the browser plugin.
- ConstantineXVI 15y agoStrictly, not yet. They /did/ announce that IE in Win8 (in Metro mode) won't support plugins of any kind, Silverlight included.
- rbanffy 15y agoSo, they are criticizing the approach they still endorse?
- scriptproof 15y agoI believe Dart may have lot of uses beyond scripting HTML pages, and does not need for IE compatibility. And I have not found a single word about Dart in the article. Just some small changes in JavaScript, very minor compared to what is planed to JavaScript 5.
- Yxven 15y agoI've never understood the point of special browser only languages. Why don't browsers support a sand-boxed python (or insert favorite language x) with some sort of standard dependency management? It already has JIT compilation, is cross-platform, bytecode, a wealth of libraries, etc. Why are we reinventing this wheel?
- MostAwesomeDude 15y agoFirefox nightlies do support Python. It's unfortunate that nobody wants to migrate away from JS though.
- tikhonj 15y agoWhy is it unfortunate? Once you learn it properly, JavaScript is a very pleasant language to work in and, I find, quite a bit more expressive than Python. It also doesn't make using a functional programming style painful the way Python does.
- romaniv 15y agoAre you implying that anyone who doesn't consider JavaScript a "very pleasant language" must simply not know it "properly"? Are you implying that there are no other possible reasons?
- MostAwesomeDude 15y agoWhat does "functional programming style" mean? Does it mean lambdas or other anonymous functions? Python lets you close over names at any scope and define functions anywhere; you don't need the "lambda" keyword. Even if you want to only use lambdas, it's been shown that Python does not need statements, only expressions, to express everything, although you quickly turn your code into Scheme-soup. JS doesn't somehow improve on this. Is it first-class functions? Python has those, just like JavaScript, although Python goes further, enabling you to have real bound methods, descriptors, properties, class methods, and all other kinds of fun. Is it map, filter, and fold? Python's still got map, filter, and fold (foldl, called "reduce" in Python.) Python also has list comprehensions, borrowed from Haskell, as well as generator expressions, providing that valuable laziness that some functional languages value so much. And, in Python 3, there are set and dictionary comprehensions as well. JavaScript doesn't have comprehensions at all. Is it referential transparency or immutability? Unlike JavaScript, Python refuses to allow you to edit the values of certain builtin types, like str and unicode. So, uh, what did you mean, exactly?
- azakai 15y agoThe most interesting part of the Microsoft blogpost that is the basis for this story, IMO, is that > The Office Web Applications, which consist of hundreds of thousands of lines of JavaScript, are written primarily in a variant of Script# that is then compiled into JavaScript that can be executed on today’s browsers. http://blogs.msdn.com/b/ie/archive/2011/11/22/evolving-ecmascript.aspx http://blogs.msdn.com/b/ie/archive/2011/11/22/evolving-ecmas... Apparently Script# is quite mature now, and is being used to compile very large apps to JavaScript. This is a big vote of confidence from Microsoft regarding JavaScript as a compilation target.
- cskau 15y ago> Apparently Script# is quite mature now, and is being used to compile very large apps to JavaScript. This is a big vote of confidence from Microsoft regarding JavaScript as a compilation target. I'd say the same thing about Google's own Closure, which they oddly enough don't mention alongside CoffeeScript et al. I see Dart as a rethinking of much of Closure so I don't quite get what Microsoft thinks the difference between their Script# and Dart/Closure is.
- azakai 15y agoDid you mean Google Web Toolkit? That compiles Java to JS, and is similar to Script# (which compiles C# to JS). Whereas Closure Compiler is an optimizing compiler for JS, it compiles JS to (better) JS. (The Microsoft article did mention Google Web Toolkit, which was nice of them.) GWT and Script# are both quite mature at this point, it looks like. Very interesting stuff. (However, GWT is probably losing focus inside Google to Dart, so I am not sure of its long-term prospects. It's open source though so anyone can continue it if they want.)
- munificent 15y agoClosure compiler doesn't just compile vanilla JS. It supports type annotations in comments and will use those to generate code. It's type system supports classes and interfaces. The Closure library has support for class-style inheritance. Programming in Closure-style JS feels like you're using an optionally-typed class-based language, just one with really terrible syntax.
- orthecreedence 15y agoIt took long enough for people to agree on Javascript and and HTML standard. It works well for most people, most of the time. Dart smells to me of another .NET for web...a framework that works ok, but not spectacularly enough for me to care. Also, it seems there are a lot of people who don't like Javascript and try to either replace it or compile down to it. I don't understand why. I love Javascript. I think it's terse and powerful. It's a perfect fit for web applications. Sure, there may be a few annoying flaws, but it works well for its intended purposes. Also, add a few libraries, or a real framework like Mootools, and most of the flaws vanish. Also, if we're going to go around creating systems for creating web apps that compile to javascript, can we PLEASE use languages that allow macros (ie a lisp variant)? Does another C-like language really add anything? (I'm actually asking, not judging)
- diamondhead 15y agoSome people working for Google pointed similar thoughts even before the launch of Dart, too.