8 ms·
Google introduces Dart, a new programming language for web applications
- rorrr 15y agoUnless all major browsers support it, the adoption will be painful and slow. It also seems like another incarnation of GWT, which, I heard, google abandoned.
- macavity23 15y agoFrom the article: "Dart code can be executed in two different ways: either on a native virtual machine or on top of a JavaScript engine by using a compiler that translates Dart code to JavaScript. This means you can write a web application in Dart and have it compiled and run on any modern browser." What am I missing?
- saiko-chriskun 15y agonot much ;)
- wavephorm 15y agoAfaik they only abandoned Gears, not GWT.
- nordsieck 15y agoAnd it's not like they abandoned Gears because no one was using it, but instead because Gears was so successful that many of the features got (sort of) rolled into HTML 5.
- saiko-chriskun 15y agoyes finally an alternative to javascript! zomg so excited :3
- thomasfl 15y agoThe optionally static types in the Dart language seems like a good idea. You get both beautiful, simple code, like in Ruby, and the possibility to speed up execution by adding types later. On the other hand, you still don't have the great community like for instance ruby has. Charles Nutter has created a static typed ruby like language, called Mirah, which looks similar.
- Peaker 15y agoFull type inference also lets you write beautiful, simple code -- without even needing to add types later, you get them now. And speeding up execution is just a bonus, the main benefit is catching errors early, and refactoring safely.
- deleted 15y ago[deleted]
- tomp 15y agoUnfortunately, there is no type inference system (that I know of) that can handle types that programmers use in dynamically typed languages on a daily basis. For example, consider the Django admin property 'list_filter' [1] or the Clojure metaprogramming functions 'proxy' [2] and 'defrecord' [3]. [1] https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter https://docs.djangoproject.com/en/dev/ref/contrib/admin/#dja... [2] http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/proxy http://clojure.github.com/clojure/clojure.core-api.html#cloj... [3] http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/defrecord http://clojure.github.com/clojure/clojure.core-api.html#cloj...
- Peaker 15y agolist_filter seems to be a closed sum type -- why do you think it's not simple to encode or infer as a static type? I'm not sure what Proxy is used for -- but it sounds like Template Haskell can probably implement it? defrecord seems like it refers to defining new types at runtime -- which is also possible via either late type-check or Template Haskell.
- bni 15y agoIs the JavaScript that comes out of the Dart compiler/transpiler readable (like the JS CoffeScript generates) or is it mush like GWT?
- bad_user 15y agoThat depends on how close is Dart to Javascript. CoffeeScript is pretty close. It just changes the syntax, but the type-system is the same.
- frou_dh 15y agoThat page crashed MobileSafari on iPad and continues to after a reboot. Is it just me?
- leonlee 15y agoIt's sending me back to Hacker News after it completely loads on my Blackberry.
- code_duck 15y agoCrashing Safari on OS X, too. Or rather, the tab hangs. It produces an "TypeError: 'undefined' is not an object (evaluating 'a[Ra]')" and "TypeError: 'undefined' is not an object (evaluating 'b.count')". The console was a bit hard to get to with webkit2 taking up 100% of a cpu and all that.
- thirsteh 15y agoOne of the design goals: "Ensure that Dart delivers high performance on all modern web browsers and environments ranging from small handheld devices to server-side execution." Server-side execution? I thought Go was their systems programming language? It sure sounds like they're competing rather than complementing each other.
- almost 15y agoThere's a lot of server side programming for which Go probably wouldn't be the ideal language. Room for more than 2 languages in the world I think :)
- thirsteh 15y agoLike what? Go is an absolutely excellent language for server-side programming. I've yet to find anything it wasn't suited for. There's room, I just don't get why Google would promote two of its own very similar languages for the same purpose at the same time.
- almost 15y agoWhat do you mean by "server side programming"? That's a pretty wide net to cast. Do you really think that Go is the ideal language for every bit of code that doesn't happen to run on a client of some sort?
- dextorious 15y agoServer side != systems programming. Think server side web programming. Is PHP/Ruby et al a "systems programming language"?
- Meai 15y agoNo IDE support, no VM in Chrome yet, also no support for calling existing javascript libraries. These three things guarantee no quick adoption. I have no idea what Google is thinking.
- jmesserly 15y agoIt's a very early tech preview.
- baddox 15y agoWouldn't "adoption" include the things you listed?
- dextorious 15y agoPerhaps just not have them ready yet? Who said Google wants "quick adoption"? The SPECIFICALLY state on the language page that its design is in flux and they ask for user input to improve it.
- haasted 15y agoThere is apparently some support for Eclipse[1], but I have not been able to find more details. [1] http://dartinside.com/2011/live-from-dart-launch/#liveblog-entry-141 http://dartinside.com/2011/live-from-dart-launch/#liveblog-e...
- harshaw 15y agoWhile looking through the sample code I found this gem: static bool isVm() { return 1234567890123456789 % 2 > 0; } Funny enough in javascript 1234567890123456789 % 2 == 0.
- mathattack 15y agoI can't open the website on my iPhone. I hope that's not a karmic hint on the interoperability of the language.
- meric 15y agoMore discussion: http://news.ycombinator.com/item?id=3092558 http://news.ycombinator.com/item?id=3092558 (it happens to be the top link also)
- sambeau 15y agoWhile Google may need this for building large applications, this is something that the web could do without. The web needs a standard Intermediate Language: a machine code. This is what Javascript is becoming and it isn't well designed for it.
- ra 15y ago> The web needs a standard Intermediate Language: a machine code. Definitely. > This is what Javascript is becoming and it isn't well designed for it. Maybe... but what does a bytecode layer provide? I wonder if something useful couldn't be written in JS that provides a thin service layer. I agree it's not ideal, but it's what we've got. Google already have a few to-javascript compilers, including one for Dart... I expect they're already all over this.
- sambeau 15y agoThe point is not that they are already all over this but rather that an IL is something that all the browser makers could get behind. If Javascript is good enough as an IL why does Dart bypass it in Chrome?
- ra 15y ago> The point is ... that an IL is something that all the browser makers could get behind. Sure, but that's not going to happen in the next decade unless that IL is in Javascript.
- mikerg87 15y agoDid I miss the part where it says this will be an open standard? This looks like embrace and extended but I hope I am wrong.
- bzbarsky 15y agoYou're not wrong, sadly. See http://3.bp.blogspot.com/-GBSGBbc9UtA/TmexwLaJN9I/AAAAAAAAAKs/06OaexCT5Ms/s1600/Lead%2Bdevice%2Bconcept.png http://3.bp.blogspot.com/-GBSGBbc9UtA/TmexwLaJN9I/AAAAAAAAAK... for a discovery document from a recent court case that indicates what Google's approach to things like this is nowadays.
- abraham 15y agoThe language spec is open. "We've made the language and preliminary tools available as open source on dartlang.org"
- grandalf 15y agoThis is a great idea. With optional typing + V8 this could be really fast. Google can leverage its strengths while opening up a language that lots of people already know to additional server side use.
- pacemkr 15y agoI was expecting something more innovative. All it is is a javascript like language with classes, interfaces, optional types, and some extra built in data structures. A new runtime, biggest obstacle being adoption, just for that seems a bit much.