Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Google Starts to Detail Dart

samzenpus posted more than 2 years ago | from the a-look-under-the-hood dept.

Google 219

MrSeb writes "After waiting for more than a month, Google has unveiled its mysterious Dart programming language... and you're going to kick yourself for getting so preemptively excited. Dart is a new programming language that looks like Java, acts a lot like Java, runs inside a virtual machine like Java... but ominously, it also has a tool that converts Dart code into JavaScript. Language-wise, its features are unlikely to knot your panties: there are classes and interfaces, it is optionally typed (you can switch between untyped prototype code to an enterprise app with typing), the syntax is very lackluster, there's a very strong concurrency model, and Google is promising lots of juicy libraries that can be leveraged by developers. Basically, the language isn't meant to be exciting: in Google's own words, it's designed to be 'familiar and natural' — and indeed, if you write Java or C# code, Dart will probably feel very approachable."

cancel ×

219 comments

Sorry! There are no comments related to the filter you selected.

Could be really cool in about 5 years or so. (1, Insightful)

LWATCDR (28044) | more than 2 years ago | (#37664086)

When and if every browser on the market supports it.
Until then it is just interesting.

Re:Could be really cool in about 5 years or so. (1)

Anonymous Coward | more than 2 years ago | (#37664150)

Do they need to support it? It can be converted to JavaScript.

Everything supports JavaScript

Re:Could be really cool in about 5 years or so. (0)

Anonymous Coward | more than 2 years ago | (#37664244)

The Dart project contains a Dart -> JavaScript compiler, so it will work everywhere from the beginning.

Re:Could be really cool in about 5 years or so. (2)

The MAZZTer (911996) | more than 2 years ago | (#37664360)

It can be cross-compiled to JavaScript. So every browser will be able to support it right off the bat. Of course it would be slower than native Dart support.

Re:Could be really cool in about 5 years or so. (2)

shutdown -p now (807394) | more than 2 years ago | (#37666068)

There are several dozen languages that can be cross-compiled to JavaScript today. So far, none of them have become popular as replacement for JS in the browser.

Re:Could be really cool in about 5 years or so. (1)

danish94 (2427678) | more than 2 years ago | (#37666442)

Because all of those were never ment to run directly in the browser. With dart there is hope that one day browsers will support it without compilation, chrome should have it soon, others perhaps later. With dart the compilation to js is just for a transitional phase until browsers adopt it. So it has more potential to become popular if developers think of it that way.

Re:Could be really cool in about 5 years or so. (1)

jandrese (485) | more than 2 years ago | (#37664678)

There is a Javascript cross compile, but no word as to how well that actually works. My experience with automatic code generators/translators like this is that they usually work fine for trivial projects, but tend to collapse when given something even moderately complex. Given how much of a moving target Browsers are, I wouldn't hold out much hope for such a device to produce usable code on its first outing. If you're lucky it will work in Chrome and you'll just have to tweak stuff to get it to work in Firefox and IE.

Re:Could be really cool in about 5 years or so. (1)

maxume (22995) | more than 2 years ago | (#37664742)

Gmail is cross compiled java.

Re:Could be really cool in about 5 years or so. (1)

Phs2501 (559902) | more than 2 years ago | (#37665032)

No it's not. Gmail (and most of Google's other high-profile Web stuff) is written with their Closure tools, which is JavaScript-based. Wave was GWT (their Java cross-compiler), but that was about it for public services other than the AdWords admin interface.

Re:Could be really cool in about 5 years or so. (1)

Richard_at_work (517087) | more than 2 years ago | (#37664920)

Doesn't CoffeeScript already do cross-compile from native to JavaScript, with quite a few proponents and examples of complex usage working fine?

No idea as CoffeeScript is something on my to-look-at list, and seems to be difficult to use on Windows.

Re:Could be really cool in about 5 years or so. (0)

Anonymous Coward | more than 2 years ago | (#37665594)

Coffeescript's whole concept is "it's just javascript". There is a 1:1 correspondence between each coffeescript construct and its javascript equivalent, so translation is trivial and mechanical in either direction, because nothing fundamentally new is added, just some new syntax.

Dart appears to be adding quite a bit to javascript, like typing, so the translation is a bit less obvious. But it is google, and they usually do a pretty good job.

Re:Could be really cool in about 5 years or so. (1)

Samus (1382) | more than 2 years ago | (#37666520)

That's partially true. In fact you can write JS style coffeescript and the js output of the compiler is just about as long as cs input. However coffeescript adds some nice syntax sugar that can translate into more complicated javascript. List comprehensions is a good example of this. The generated code isn't very complex and you could write it yourself with a little bit of effort but you don't have to. That's the main selling point of coffeescript. It takes a simpler syntax and translates it to the code you would have written yourself (if you are of any decent skill level). What it does not do abstract you away from all of the odd parts of javascript like 'this' being context based. It does help some like taking away the ability to use == and forcing everything to be ===. If you're going to do a lot of javascript I would still recommend doing it in coffeescript. If you get tired of coffeescript mid way through just switch over to using the last bit of compiled output and go from there.

Re:Could be really cool in about 5 years or so. (1)

georgesdev (1987622) | more than 2 years ago | (#37665744)

it's relevant today. Let java programmers program javascript web apps easily and today. This is great news for their Chrome OS clients.
Also it's great for Google's patent issues with Java. If developers go away from pure Java, Google probably has less patent issues with oracle.
It also means programmers can code for Android, chrome Os, and PCs with no porting. That's a big deal!!!
For customers like me and you, however, I don't see a big plus.

Enlighten me (2)

Peristaltic (650487) | more than 2 years ago | (#37664094)

.... but ominously, it also has a tool that converts Dart code into JavaScript.

Sounds pretty mundane to me- What's so ominous about converting to JS?

Re:Enlighten me (1)

MichaelKristopeit417 (2018862) | more than 2 years ago | (#37664316)

the real ominous act was the slashdot editors choice to publish this slander.

slashdot = stagnated

Re:Enlighten me (-1)

Anonymous Coward | more than 2 years ago | (#37664682)

You butthurt the editior slashfag.
sd

asd
  sdaf
  dfsa
dsf
asd
  fasd
sfd
sad

Re:Enlighten me (0)

Anonymous Coward | more than 2 years ago | (#37664688)

Why do you continue to post this drivel? The only thing stagnated is you.

Re:Enlighten me (1)

larry bagina (561269) | more than 2 years ago | (#37664946)

in this case, the article is awful. A simple link to the dart website [dartlang.org] would have been much better.

Re:Enlighten me (1)

Bucky24 (1943328) | more than 2 years ago | (#37665528)

As was said in a comment above, browsers are moving targets. Even for the HTML5 DOM there are sometimes two different way to access a certain thing depending on which browser. Isn't really hard to work around, but someone would have to constantly be updating the converting tool as new changes come out.

Re:Enlighten me (2)

bcmm (768152) | more than 2 years ago | (#37666228)

Writing Dart-only websites is obviously a bad idea. Writing stuff that will work an order of magnitude slower on JS browsers could seem like a sensible lazy solution to many, especially if Chrome continues to gain market-share.

In the worst case, this could lead to everybody having to implement Dart, and the new de-facto standard scripting language being controlled by Google, who, running several of the world's most popular websites, can hardly be considered neutral.

Android? (1)

Stonent1 (594886) | more than 2 years ago | (#37664128)

I wonder if they are trying to position this in any way to distance themselves from Java and provide a new interface for Android apps?

Re:Android? (1)

Sunday_Ironfoot (2431708) | more than 2 years ago | (#37664252)

DART is meant to replace JavaScript, not Java. Although it could conceivably be used to write native Android apps, by providing the right libraries and API's, similar to using HTML/JavaScript to build native Windows 8 apps.

Re:Android? (1)

jkflying (2190798) | more than 2 years ago | (#37664276)

No, it's designed to run on web servers. Full Java replacement perhaps, but not J2ME.

Re:Android? (2)

rycamor (194164) | more than 2 years ago | (#37664908)

Seems to me DART is meant to replace the ubiquitous PHP/Javascript combination. Think about it: quick prototypes with untyped code, moving to static typechecking wherever wanted, Server-side and client-side execution, built-in HTML5 DOM library. Its features may be unexciting, but they could provide an easy escape from PHP/Javascript hell without too much learning curve.

If that is Google's primary target with DART, it may prove to be a very strategic move.

Re:Android? (2)

DragonWriter (970822) | more than 2 years ago | (#37665242)

No, it's designed to run on web servers. Full Java replacement perhaps, but not J2ME.

Its designed to run both client-side and server-side.

Re:Android? (1)

DragonWriter (970822) | more than 2 years ago | (#37664926)

I wonder if they are trying to position this in any way to distance themselves from Java and provide a new interface for Android apps?

They've made pretty clear what their exit strategy for Android is: move things to the browser, merge with ChromeOS, and do everything as browser-based apps (not necessarily web-apps in the traditional sense, as Chrome supports browser based apps that can be fully offline, and which can include native code.)

So, insofar as this is this intends to replace JavaScript as the main programming language for in-browser apps, and can be expected to fairly quickly be supported as a first-class citizen on Google's browsers even if it may be longer before it is supported elsewhere other than via a JS bridge, its part of that strategy, though not necessarily indispensable in that role.

It's not a bad thing (4, Informative)

i kan reed (749298) | more than 2 years ago | (#37664284)

The world actually needs more "enterprisey" languages. If you want experimental, fun languages, your choices are actually very good, what with ruby, python, and a ton of functional languages. In terms of safe and good for scalable, risk-averse environments, there's pretty much just Java and C#. Java seems to have accumulated so much inertia, it doesn't add new features anymore. As for C#, the problems dealing with Microsoft are well-known to the slashdot community already.

A little more competition in that arena would do the industry some good.

Re:It's not a bad thing (2)

wzzzzrd (886091) | more than 2 years ago | (#37664902)

Exactly. In terms of "heavy enterprise", meaning the real back ends of big financial companies, airline conglomerates and insurances...They only let you touch their valuable cobol systems through java, mostly 1.3 (1.4 if you're lucky). The java 5 route (and thus 6, 7, 8) is too risky because of Oracle. Any new development in that sector is good news. Although some java integration is necessary (mostly connectors and MQ systems), because these are tested for 10+ years and that counts more than anything else.

And no, twitter is not enterprise. You ruby wizards and whatnot-gurus, go bashing google or whatever further down the page.

Re:It's not a bad thing (1)

DragonWriter (970822) | more than 2 years ago | (#37665284)

In terms of safe and good for scalable, risk-averse environments, there's pretty much just Java and C#.

If by "risk averse", you mean "will only use what at least 1/4 of the rest of the people doing the same thing are using because it needs to be 'established'", then you'll never have more than a couple of options at best.

If you mean any other sense of "risk averse", well, you can probably add Erlang to that risk, and several other things.

In any case, it'll take quite somet time before any newly-created language is established enough to be attractive to any kind of "risk averse" environment.

Re:It's not a bad thing (1)

Nerdfest (867930) | more than 2 years ago | (#37665330)

... and the problems dealing with Oracle are currently becoming obvious.

Re:It's not a bad thing (3, Interesting)

JustinOpinion (1246824) | more than 2 years ago | (#37665492)

I agree, but in such cases, isn't the solution to make current "fun" languages more "enterprisey" by improving the back-end toolchain? Disclaimer: I'm by no means an expert (I'm a physicist with a minor in CS, not a hardcore CS person), so maybe I'm way off-base here (corrections welcome).

Take Python. I love its syntax, the plethora of libraries available, the ability to rapidly prototype and see immediate results. All the things that make it "fun" really do make it productive (shorter time to a final, correctly coded solution). It's a great language. However, it doesn't run as fast as C/C++ code, for obvious reasons (interpreted, dynamic typing, etc.). There are ways to make it faster (rewriting critical subsections in C/C++, using fast libraries intelligently, various optimizers and pseudo-compilers exist, etc.). But everyone (or at least me) would love to code using Python syntax but have the code run as fast as C/C++. Best of both worlds.

In other words, what I would love to see is tons of effort put into making toolchains for making Python (or other "fun" languages) faster (and probably by association more enterprisey in terms of being type-safe, etc.). I'm not saying doing this would be easy, but there are various proofs-of-principle for compiling Python code or automatically converting it to C/C++ code and whatnot. It could be done and would allow programmers to use the clean syntax of Python to more rapidly code a project without feeling bad about the performance not being up to scratch.

Again, I'm aware of the alternatives (rewrite bottlenecks in a fast external, etc.). But it seems to me that we've learned a lot about what makes for a nice high-level syntax, so we should automate the grunt-work of converting that syntax into fast low-level code. (Yes, I'm aware of gotchas such as dynamic typing preventing full compiling in some cases, but something like adding type hints to a high-level language would surely be less onerous for programmers than going to a lower abstraction level wholesale. Even type hints could be automatically inferred by a parser in a lot of cases, with a programmer checking that they make sense...)

Re:It's not a bad thing (1)

randallman (605329) | more than 2 years ago | (#37665980)

And why must "fun" and "enterprisey" be exclusive? If your definition for enterprisey is scalable and risk-averse, why can't a language that is pleasant to use meet those requirements?

I maintain hope for a language, compiler/runtime, and library that allows me to easily communicate my solution without being distracted by the language implementation (fun), while offering good performance and scalability. As for being risk-averse, there are never any guarantees there and I doubt you'll find that the great successes and advancements of the past belong to the risk-averse.

Re:It's not a bad thing (1)

haystor (102186) | more than 2 years ago | (#37666312)

And why must "fun" and "enterprisey" be exclusive? If your definition for enterprisey is scalable and risk-averse, why can't a language that is pleasant to use meet those requirements?

When you give "enterprisey" programmers a decent programming language, a foot shooting contest breaks out.

This is why we can't have nice things.

Re:It's not a bad thing (1)

corbettw (214229) | more than 2 years ago | (#37666242)

If you want experimental, fun languages, your choices are actually very good, what with ruby, python, and a ton of functional languages. In terms of safe and good for scalable, risk-averse environments, there's pretty much just Java and C#.

Do you have any idea how much financial code is written in Python? I take that back, because it's obvious you do not.

I got excited? (1)

sgt scrub (869860) | more than 2 years ago | (#37664302)

I would describe it more as "a funny feeling".

There shall be puns (1)

rwa2 (4391) | more than 2 years ago | (#37665490)

Still no confirmation whether the object declaration will go something like:

objet d'art(foobar) { }

Bad article and summary (2)

fnj (64210) | more than 2 years ago | (#37664326)

Both the article and the summary don't seem to get it. This sounds like C#.NET take two, with the added trick that until browser support for the real Dart is there, you can deploy by translating your client side Dart code to JavaScript.

Re:Bad article and summary (1, Interesting)

gbjbaanb (229885) | more than 2 years ago | (#37665172)

just great... Java took at the 'best' ideas of C++ and then mangled it into something pretty nasty - a memory and resource hog with poor performance, especially for GUIs, and added non-deterministic finalisation (eventually - the original didn't even have that!) with verbose OO code everywhere. The only good thing it gives is a huge set of libraries.

C# took that and did even more to it, so much so that you require an IDE to write code.

So what does Google do? Take these languages and builds on top of them even more! Great, just great.

Why don't they go back to the source, learn the mistakes that Java made (yes, some were just design decisions, others were due to the limitations of computing back then) and create a language initially based on C++ with the good bits of that included. Modern C++ is pretty good, if Google could update it by removing the 'backward compatible with C' stuff, and some of its poor design decisions (eg auto_ptr for example) then there's a good chance we'd get something pretty damn good.

As it is, I imagine Dart will be just Java in all but name with a javascript compiler. I doubt anyone will be too enthused about that if they can write javascript in the first place.

Re:Bad article and summary (0)

Anonymous Coward | more than 2 years ago | (#37665512)

Why don't they go back to the source, learn the mistakes that Java made (yes, some were just design decisions, others were due to the limitations of computing back then) and create a language initially based on C++ with the good bits of that included.

I think that was called 'Go [golang.org] '

Re:Bad article and summary (1)

UtterCoward (1312805) | more than 2 years ago | (#37665694)

The assertion that C# requires an IDE is arbitrary and deserves some kind of supporting evidence. Personally, I find that it is much, much easier to write C# without and IDE than C++. It has so much less ceremony than C++ and it feels more succinct than Java.

Re:Bad article and summary (1)

gbjbaanb (229885) | more than 2 years ago | (#37666352)

I disagree about the ceremony of C++, C++ is a lot lower level and library code is pretty direct. C# on the other hand does like you to create classes all over the place (I'm thinking especially of XAML where you can only bind a gadget to a variable via an object which has properties - the equivalent in C++ would be 2 lines of code, and one of those would be the variable declaration).

I wouldn't like to resolve those namespaces or the horrendously long method names that most style guides expect you to use without an IDE -- think of all the event / delegate hookups you've written and tell me they fit on an 80 characters display :)

Java, of course, is in the middle - and not as good as either for the different areas C# or C++ excels at. a good reason not to use it as the start point.

Re:Bad article and summary (0)

Anonymous Coward | more than 2 years ago | (#37665732)

From the Google internal memo, they seem to be using their languages like so:
C++ is used sparingly, and only when the full weight of C++ is needed.
Go replaces most of C++.
Dart is used where most people would cobble together PHP/Java, and other light Java tasks.
Java still gets used when the full weight of Java is absolutely needed.

Re:Bad article and summary (0)

Anonymous Coward | more than 2 years ago | (#37665982)

C# took that and did even more to it, so much so that you require an IDE to write code.

Wait... You mean you write Java without an IDE?

Re:Bad article and summary (1)

Dr. Tom (23206) | more than 2 years ago | (#37665382)

funny, I liked the Go language they developed

Re:Bad article and summary (1)

UtterCoward (1312805) | more than 2 years ago | (#37665506)

Go is a wonderful language. I think that the well has been poisoned by flawed summaries, context-free bullet-pointed feature lists and snarky comments. Too bad for all of the folks who passed on it. I'm coding a big project in it, and using it makes me feel happy.

That's actually very good! (2, Insightful)

goruka (1721094) | more than 2 years ago | (#37664348)

The main problem of Java and C# is that they are controlled by Oracle and Microsoft respectively, both of which have repeatedly shown to not play nice with the open source developer community, have used patents aggressively and care very little for open standards.
Even mono is not open enough to allow usage in many embedded devices (read: game consoles) without paying royalties, due to the GPL license.
A replacement for those that is portable, can be used everywhere, is easy to migrate to and is distributed by the very permissive licenses Google always utilizes sounds extremely good in my view, so I think the negative tone of the summary is misplaced..

Whoa there (4, Insightful)

SuperKendall (25149) | more than 2 years ago | (#37664684)

The main problem of Java and C# is that they are controlled by Oracle and Microsoft respectively

But Dart is controlled WHOLLY by Google. Why is that really any different or better?

The reality for Java is much better, it's controlled by a community standards body (the JCP). Oracle can provide direction but they are NOT in control the way Microsoft and Google are.

Re:Whoa there (1)

goruka (1721094) | more than 2 years ago | (#37664944)

RTFA and the links to Dart website, Google intends to submit it to become an open standard. Also you ignored the patetns and very permissive implementation points.

Re:Whoa there (2)

caywen (942955) | more than 2 years ago | (#37665204)

That's what Microsoft did with C# and the CLI, too. Either we believe that our open standards bodies are real, and that standards are indeed standards, or we believe that they are corruptible by corporations and nothing is actually standard, or we believe that somehow Google is an incorruptible paragon of holy perfection.

I understand the reasoning behind the first two. I think the third might indicate substance abuse.

Re:Whoa there (1)

Imbrondir (2367812) | more than 2 years ago | (#37665268)

The difference is that Google have pretty much a clean track record when it comes to open source software. That could of course change, or be sold like Sun. But it does matter

I would agree on your points about Java and JCP in theory though. But in practice how much good has it really done for Java? I despite working with Java, but I love working with dictator controlled Python.

Re:Whoa there (5, Informative)

Raenex (947668) | more than 2 years ago | (#37666356)

The difference is that Google have pretty much a clean track record when it comes to open source software.

I don't think so. Chrome was marketed as an open source browser, yet from the very first release they added in proprietary bits without source code. It's nice that it is almost open source, and that Chromium exists, but it's important to note they compromised on open source principles.

This continues now with Android, with Google releasing Honeycomb for their partners without releasing the corresponding source code. I don't care what excuses Google gave for that, no source code is no source code.

Google cannot be trusted. They are a big corporation looking out for their own interests. Sure, they play nice for the most part, but many times they don't.

Re:That's actually very good! (1)

dintech (998802) | more than 2 years ago | (#37664914)

The main problem of Java and C# is that they are controlled by Oracle and Microsoft respectively

Google is still pretty young, you haven't given them enough time to become utter bastards yet.

Microsoft? (1)

Fujisawa Sensei (207127) | more than 2 years ago | (#37665612)

It took Microsoft less time than Google has been around to start being utter bastards.

Re:That's actually very good! (1)

caywen (942955) | more than 2 years ago | (#37665002)

In the world of programming, you choose your poison and insist to everyone that you are feeling fine.

frost 41st (-1)

Anonymous Coward | more than 2 years ago | (#37664366)

But many find it profits wi1thout Slashdot's Lubrication. You Me8bers' creative are tied up in are a few good

In short (1)

unity100 (970058) | more than 2 years ago | (#37664376)

Its java.

Re:In short (2)

wzzzzrd (886091) | more than 2 years ago | (#37664624)

...with first class functions. So it's not java, thanks for playing.

Re:In short (1)

shutdown -p now (807394) | more than 2 years ago | (#37666088)

Java with first-class functions and opt-in dynamic typing is called C#. ~

Re:In short (1)

gilleain (1310105) | more than 2 years ago | (#37664660)

Its java.

With optional typing. So, more like groovy.

Re:In short (1)

PybusJ (30549) | more than 2 years ago | (#37664694)

No, no, no -- it's most definitely not java. Google are being sued by Oracle over their use of Java in Android, don't you know. Any new language from Google is not java, not at all. Any superficial similarity you think you see is a mistake, so don't you go mentioning it Larry Ellison.

Re:In short (3, Informative)

Sunday_Ironfoot (2431708) | more than 2 years ago | (#37664826)

Java = Statically, strongly typed language (like C# .NET) with classical inheritance, compile time safety etc.
JavaScript = Dynamically typed language with first class functions with prototypal based inheritance, some runtime safety
Dart = Dynamically typed language with first classes functions, but with some support for static types & classical inheritance, still runtime safety/error checking, no compiling etc.

Dart is more like JavaScript than Java. It's been touted as a JavaScript replacement, not Java. Although, just like JavaScript and Java, it can be used for more than just browser based client-side web apps.

Re:In short (1)

DragonWriter (970822) | more than 2 years ago | (#37665118)

Its java.

First class functions? Dynamic typing with optional static typing? Its not really very much like Java. It is more like the love child of JavaScript and C#.

Looking at the spec, it looks like it has some of the best features of both and I'm looking forward to getting my hands on it.

Here we go again (0)

Anonymous Coward | more than 2 years ago | (#37664380)

Hey, I know another company that did this.

This meaning that they used Java, got into legal trouble with Java's owner and then created a similar language of their own. Worked out pretty well for them that time I think.

My bot shot first issue (0)

Anonymous Coward | more than 2 years ago | (#37664390)

How could this ever compete with native code (iOS) ? Those people never learn, even Jobs realized it that quality software = native software and Apple is dominating in app quality now. Another gimicky language to undermine their own platform...

Re:My bot shot first issue (1)

rubycodez (864176) | more than 2 years ago | (#37664562)

Apple is a niche market, non-native code is huge elsewhere.

Why is JS compiling ominous? (2)

AC-x (735297) | more than 2 years ago | (#37664426)

but ominously, it also has a tool that converts Dart code into JavaScript

No, that's an excellent feature. Allows us to start developing sites with this new language without having to wait for all browsers to upgrade or to have plugins installed. How else would you get any sort of main stream takeup of a javascript replacement?

Re:Why is JS compiling ominous? (1)

LWATCDR (28044) | more than 2 years ago | (#37664806)

Yes and no.
Unless Dart is "much better" why take the time to learn a new language where support will depend on two codebases. You will have your Dart code and your js translation of your Dart code?
If you know JS your going to keep developing in JS until Dart support is proven and universal.
Even then you will probably keep using JS unless you start a new project.

Re:Why is JS compiling ominous? (1)

AC-x (735297) | more than 2 years ago | (#37665020)

I don't see why this is any worse than a compiled language (Java, C# etc.), it's not going to be hard to manage your sourcecode and the JS output if you've got an automated build of your web project set up.

Having done a lot of big projects in JS for me it has a lot of shortcomings and it would be great to have a replacement language that is backwards compatible. Sure I wouldn't do anything enterprise level for a year or so while Dart proves itsself, but I would happily use it for large projects before widespread browser support.

Re:Why is JS compiling ominous? (1)

LWATCDR (28044) | more than 2 years ago | (#37665152)

It comes down to time for most developers. For instance I need to filter a large text file a few weeks ago. I have been thinking about learning Python because it seems pretty interesting. Time ticks buy as I am reading and setting up things and then I think, " if I used perl I would have been done". So I write the four line perl script and I am done.

A tool just needs to be a lot better to be worth the time sink. A lot of the time Good enough is just that good enough.

Re:Why is JS compiling ominous? (1)

AC-x (735297) | more than 2 years ago | (#37665276)

To a degree, but if everyone stuck to this mindset then everyone would still only be using the first language they ever learnt. It's like saying that no-one will ever use Java or C# because they know PHP and it's "good enough".

Dart has many nice features that would be very useful for large multi-developer projects (typing, static checking etc.) which would easily offset the time for developers to familiarise (one of the design goals of Dart is that it is easy to learn from a javascript background anyway).

Re:Why is JS compiling ominous? (1)

sgt scrub (869860) | more than 2 years ago | (#37665636)

" if I used perl I would have been done".

And if they would have spent this time, effort, and money on Parrot... You, the Python coder, the Lua coder, and the insert Parrot supported language [parrot.org] coder would have been done.

Re:Why is JS compiling ominous? (1)

marcosdumay (620877) | more than 2 years ago | (#37666532)

Well, it should be obvious, but I'm saying anyway: Wait to learn Python when you have a problem that isn't The One Thing one of the languages you know shines at.

When you need to filter a text file, please do it in Perl*, not Python. That is good advice even for Python programmers.

* Or Haskel. It is amazing how good Haskel is for filtering text. But, of course, you need a completely different mindset than you'd use with Perl.

Re:Why is JS compiling ominous? (1)

Imbrondir (2367812) | more than 2 years ago | (#37665368)

There is also the question of legacy code. There are plenty of excellent js libraries out there that I want to use. Does it have a decent strategy on interfacing with those?

Re:Why is JS compiling ominous? (1)

dintech (998802) | more than 2 years ago | (#37664954)

Dart code into JavaScript

Yawn, we've seen this before with GWT for Java. Wake me up when it has code to convert Dart into Bacon Sandwiches.

Re:Why is JS compiling ominous? (1)

randallman (605329) | more than 2 years ago | (#37666094)

It's becoming obvious that browsers need to support a runtime like LLVM in addition to or instead of javascript. That way, the developer could use their language of choice and just compile to LLVM byte code instead of to javascript. I would think it should be easier to optimize performance for LLVM byte code that for javascript. Would there be any downsides except for the fact that it does not exist already?

Oh, GREAT! (0)

Anonymous Coward | more than 2 years ago | (#37664648)

Another VM machine with a thousand layers of abstraction.

Instead of writing good code in the languages we already have, let's spend millions of man-hours optimizing hardware and porting existing frameworks to run on mess, and then give up on it after 15 years because it obviously compares unfavorably with native code.

Sounds familiar?

very simple exlpaination (0)

Anonymous Coward | more than 2 years ago | (#37664708)

it works just like java .. why .. because google is worried about the future of java @ oracle, as should the rest of the programming community. All it takes is for oracle to decide to lock down lava and require hefty licences to use it. they developed their own java-like language to slowly migrate and make the switch.

as for browsers supporting it, i don't see how that is relevant. it pushes/converts things to javascript. And if you want to run a native dart "applet" you'll need a plug-in just like you do for java.

Perl (1)

liquidhokie (2044274) | more than 2 years ago | (#37664750)

Screw it... just use perl.

Re:Perl (1)

vlm (69642) | more than 2 years ago | (#37665488)

Screw it... just use perl.

Sorry, its not on The List

https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS [github.com]

Supposedly you can compile scheme, ruby, or basic into JS. Never tried it, don't know.

I transitioned from Perl to Ruby probably about 6 years ago, it was fairly painless, would advise if you feel you're "stuck" on perl to try ruby.

Re:Perl (1)

sgt scrub (869860) | more than 2 years ago | (#37665532)

awk

Closed platforms (2)

Animats (122034) | more than 2 years ago | (#37664846)

The ominous part of that memo is "The cyclone of innovation is increasingly moving off the web onto iOS and other closed platforms." By which they mean iPhone and Android "apps". "Apps" are not a very good environment, and many of them are just web pages with delusions of grandeur. But that they have a payment model, DRM, and give the app distributor absolute control.

It's all about screwing the end user. "You're the product, not the customer".

As a language, Dash looks mediocre, as the article points out. "Optional typing", an idea that started with Visual Basic is usually a lose in language design. Statically typed languages have been successful, and dynamically typed languages have been successful, but optional typing is usually an afterthought bolted on to increase performance at the cost of programmer confusion. There's a typed Python variant, for example; PyPy is written in it. It's rarely put in a language from the beginning.

A few languages have tried a form of soft typing, where you have, essentially,"integer", "real", "boolean", etc., and arrays of same, plus "object". That way you get efficient code for machine arithmetic, which means you can do codecs and graphics in the language. Objects have to be dispatched anyway, so a performance penalty there isn't so severe.

Static types (0)

Anonymous Coward | more than 2 years ago | (#37664968)

Looks like they've put static types in the specs, just to list as a feature. Seems pretty cheaty to me, a really simple and optional compiler check.

How is this Java-like? (1)

tires don exits (2460114) | more than 2 years ago | (#37665050)

I'm looking at a couple of the examples, and this looks far more Perl-like than Java-like. I can see some things that look like they were inspired by Java in the syntax (mostly the interfaces), but the print syntax is definitely more in line with how Perl works.

It also has a free "main" function, which is C/C++/D-like and isn't Java-like in anyway whatsoever. There looks like there's either dynamic typing or type inference (I'm guessing a combination of the two personally) which is C++11/C#/D/.

Also, I'm not sure how a VM has anything to do with being Java-like. A VM is pretty much a staple of any interpreted language. Your code is always running on a machine. If it's not running native code, it's running on a VM interpreting bytecode (which may JIT sections to bytecode, the distinction between VM and native code is becoming smaller every day).

Strange definition of "ominous" being used there. This sounds like an amazing leap for web development.

Re:How is this Java-like? (1)

tires don exits (2460114) | more than 2 years ago | (#37665324)

Upon closer inspection, looks far more Scala-like than Java.

Quick! Everyone start converting your code! (1)

caywen (942955) | more than 2 years ago | (#37665080)

I have this idea of a new language that is 100% Javascript-compatible. It would require no code conversion whatsoever, works with your existing tool chain, and requires no new learning. It started out from an Ada-like project, and I dubbed it "New ADA", or "NADA". It's evolved quite a bit and doesn't look like Ada anymore. In fact, it looks exactly like Javascript. But it's new! I recommend that everyone start using Nada as soon as possible to open a whole new world of possibilities.

First Impressions (1)

TheCount22 (952106) | more than 2 years ago | (#37665402)

Looking at the syntax it looks like nothing special. However, I have to admit it looks infinitely better than JavaScript.

I am really curious about these isolates, what do the rest of you think?

go (1)

Dr. Tom (23206) | more than 2 years ago | (#37665412)

no, seriously, didn't Google just abandon the Go language?

Re:go (1)

UtterCoward (1312805) | more than 2 years ago | (#37665798)

I haven't seen or heard anything to the effect that Google has abandoned Go.

Re:go (1)

jgeiger (1356045) | more than 2 years ago | (#37665886)

Go = backend
Dart = frontend

Standard library (1)

thue (121682) | more than 2 years ago | (#37665418)

The corelib looks very sparse: http://www.dartlang.org/docs/api/index.html [dartlang.org]

The thing I like about jquery and dojo is that you actually get a reasonable standard library, which JS sorely lacks. It would be nice if dart included a better standard library.

The end game for GWT (1)

Windrip (303053) | more than 2 years ago | (#37665470)

GWT rocks - don't expect it to go easily into that good night.

Consider the following scenario:
o Convert the compiler to accept Dart instead of "pure" Java. Remember, GWT does not implement the entire language, only a subset of the run-time. This conversion can easily be implemented as a rolling replacement to the compiler.
o There's absolutely no reason now for GWT to support Java 7+
o The Google Plugin for Eclipse will easily convert to Dart, keeping the developer mind-share
o Keeps all those nifty 3rd party libraries
o Keeps the advantage of all those optimizations that the GWT compiler reduces to practice. Google will not flush all that work.
o Tell Larry to stick it where the sun don't shine

MIT licensed anylanguageVM (2)

sgt scrub (869860) | more than 2 years ago | (#37665478)

If Google would have spent time and effort on Parrot or helped to release a VM that interprets multiple languages under the MIT license, I would be loving Google. Another scripting language and VM doesn't make me warm, fuzzy, or even remotely interested.

Re:MIT licensed anylanguageVM (1)

shutdown -p now (807394) | more than 2 years ago | (#37666104)

Look up PNaCl. To be honest, I'm somewhat disappointed that this Dart thingy isn't running on top of that.

In the year 8357 A.D... (0)

Anonymous Coward | more than 2 years ago | (#37665576)

there are two sentient beings existing in a virtual reality plane, excavating what seems to be layers of execution abstractions...

archaeologist #1: Just another day of the same eh mate? we've been digging for months. We find nothing but malware from various era...
archaeologist #2: I feel ya mate. But today's such a beauuuutiful day, I think we might find something milky way-shattering.
archaeologist #1: The origins of the modern day sentient beings...
archaeologist #2: Ya got that right mate. I was told our reality is build atop of one layer over another, leveraging the most mature technologies of their respective time.
archaeologist #1: You remember professor Moveax Esi? He taught us the equivalence of sentience executing on different substrates. What differs is the perception of time.
archaeologist #2: I remember that, mate. Coupled with the universe's speed limit of c, each added reality layer inevitably leads to slower perception of time, with respect to the very first layer.
archaeologist #1: Ah, the first layer. I wonder what it could be, and what it is made of.
archaeologist #2: That's what we are here for, mate. To find it and reveal it to the world.
archaeologist #1: OH MY. I think I hit something.
archaeologist #2: What is it, mate? Did you find the first layer?!
archaeologist #1: I think so. Look...
archaeologist #2: *Gasp*
archaeologist #1: It's made using...DART?
archaeologist #2: Glorious! DART...it looks so ancient, mate! What interesting constructs...we gotta show this to the world!
archaeologist #1: Agreed...wait! There's something beneath it!
archaeologist #2: What is it?
archaeologist #1: It...it reads...javascript.
archaeologist #2: What is that?
archaeologist #1: I...I don't know.
archaeologist #2: Look at this. What is this...if (isChromeBrowser() || isFirefoxBrowser())...
archaeologist #1: Look, another one here! if (isMSIE8())... else if (isMSIE9())...
archaeologist #2: I don't know, mate. All this...looks awful.

The real reason for Dart (1)

IGnatius T Foobar (4328) | more than 2 years ago | (#37665708)

The real reason Google is developing the Dart language is to hedge their bets in case they lose the frivolous lawsuit filed by Oracle. Rather than pay royalties to Oracle they will make Dart the primary development language for Android. They will make Dart compile down to Dalvik bytecode (chances are, they've already done this) and they might even offer developers a tool to translate Java source to Dart source.

Remember, Dalvik bytecode is not Java bytecode. Android only uses the Java language, not its virtual machine, which is why Oracle mistakenly believes they can sue Google over its use. Changing the source language removes the perceived violation without breaking existing software.

Re:The real reason for Dart (1)

tobiasly (524456) | more than 2 years ago | (#37666284)

Remember, Dalvik bytecode is not Java bytecode. Android only uses the Java language, not its virtual machine, which is why Oracle mistakenly believes they can sue Google over its use. Changing the source language removes the perceived violation without breaking existing software.

Mistakenly? I'm pretty sure they *are* suing Google over its use.

More Virtualization == More Speed! Recursion FTW (0)

Anonymous Coward | more than 2 years ago | (#37665752)

Just what we need, another virtualized language.

Why not. for the greatest speed possible, run it inside a java interpreter, written in java, running on a java interpreter written in java.

Just think of the raw speed.

Since "java is faster than C" at least in the java world, we would get a bigger speed boost on each level of recursion!

Interfaces = Meh (1)

kikito (971480) | more than 2 years ago | (#37665870)

I was really hoping that they included something like Ruby's mixins. I'm sorry, Google, but I'm not interested.

Lack of imagination (1)

dtbx (2481462) | more than 2 years ago | (#37665972)

Google lacks imagination when designing a new language. Even Microsoft can design a bold language like F#, whose design was inspired (or stolen) from OCaml. Microsoft Research has at least two geniuses working for them: Simon Peyton Jones and Erik Meijer. Both came from the Haskell world.

Can Google design an experimental language crazier than Dart (or Go)?

Who wants another Java?

I don't want to learn a new language that lacks functional features, or my beloved lambdas. For me, is simply not functional, haha.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>