11

I understand that Dart has just been released, and while it's not entirely stable (along with the fact that its native code base is relatively small), I was curious to know if, for new developers coming along, if there would be any point at all in skipping JavaScript and going straight to Dart. I, personally, haven't really done much front-end web development beyond Html5/Css3, and am considering skipping JavaScript/JQuery/Ajax, etc, simply because of the fact that Dart appears to be fresh, new, and more advanced.

Despite that, one reason why it might not be the best idea is this post in particular.

Some of the features of JavaScript: - A large amount of frameworks relatively available. - Ease of use, is a simple yet powerful language. - Ajax/Jquery. - Non-proprietary (to my knowledge, despite the fact that NetScape originally developed it, I have no who actually owns the rights to the language, if at all - please edit this if I am wrong). - Prototyping (some might argue that this is good for scripting only

Some of the features of Dart: - Object-oriented, implementing features found in many of Java/C-variant languages. - Super Interfaces. - Message sending/Method invocation. - The ability to switch between dynamic and static typing. - Pointers (yay!)

So, any thoughts here?

Community
  • 1
  • 1
Holland Schutte
  • 231
  • 2
  • 10
  • 12
    You are going to be shut down because this isn't a real question and invites discussion. But for the record, you missed the most important aspect of javascript - it's avaiable in every browser in use and is probably the most widely used language on the planet. – RobG Nov 02 '11 at 02:12
  • 2
    @RobG But since Dart offers "cross compilation to JavaScript" then (at least for what is supported) the argument that Dart limits the target from JavaScript-"only" web-browsers is moot... –  Nov 02 '11 at 02:38
  • @pst But you've seen the "Hello World" sample that compiles to thousands of lines of JS, right? I'm not saying there's no room in the world for Dart, but I'm saying that compiling to JavaScript won't save it; it will need native support for widespread adoption. – Greg Pettit Nov 02 '11 at 02:51
  • yeah skip javascript and go to dart – david Nov 02 '11 at 03:07
  • @Holland: You might have gotten a better discussion if you used a less inflamatorry title. The "skipping" part is very rude, specially considering that Dart is *not* a "strict upgrade" from Javascript and is different in oh so many ways. – hugomg Nov 02 '11 at 03:09
  • My apologies, I had no intention of offending anyone with my question - my intention was to get an objective analysis of both languages. I appreciate the answers given...but, admittedly I may be a bit biased towards Dart, although that's just because of personal preference. It seemed like that since Dart had been released, it could potentially compete with JavaScript, and that there would be a worthy dividend between the two, kind of like Php vs ASP.Net. – Holland Schutte Nov 02 '11 at 03:18
  • @HollandSchutte try a more sensible comparison like C++ vs go. – Raynos Nov 02 '11 at 03:22
  • @GregPettit Dart is in preview mode. Compilation will be improved. That said, a "Hello World" will never be the best example. The point of Dart is to allow tooling and to help maintain large codebases. – moraes Nov 12 '11 at 11:42
  • As far as I know DART is intended as an alternative to JavaScript and asking if it is better to skip or learn JavaScript first is like asking if you are better of learning Java first before C# in my humble opinion. That's the things about alternatives, you pick one or the other. Or learn both and then decide. – Nope Oct 12 '12 at 12:25

3 Answers3

6

A short answer before this question gets closed as being too far down the discussion and opinion path:

Skipping JavaScript may be fine for your own work as long as you are the one able to decide on the platform, but what will you do if you have to work on an existing project that uses JavaScript extensively? JavaScript is everywhere.

Also, even if you're doing completely new development on a platform you control what if you want to figure out how someexistingwebsite.com does some special effect? You'll probably need to look at that website's JavaScript code...

You said:

Some of the features of Dart: - Object-oriented

JavaScript is object-oriented.

nnnnnn
  • 147,572
  • 30
  • 200
  • 241
  • 4
    _"i disagree with you for calling java an oo"_ - @Anirudha I assume you meant to say "JavaScript" rather than "Java", but anyway there is no doubt that JavaScript _is_ object-oriented. It's not a "big" mess either: there is "small" mess here and there, certainly, but few experienced JS coders have any problem with it overall. I didn't say you couldn't start directly with DART, I just pointed out some drawbacks in doing so. As for DART being "better" than JavaScript, that's a bit like saying red is better than blue. It's your _opinion._ – nnnnnn Aug 26 '12 at 01:40
3

Dart appears to be fresh, new, and more advanced.

Dart is not fresh, it's a re-hashed bag of ideas and well to put bluntly lacks the innovation you expect from Google.

Sure it's new, but that doesn't mean anything. Go was new two years ago, where is it now?

Advanced? What? How does that work. JavaScript is more advanced because of the wide range of systems and tools available for it.

I highly recommend you skip the Dart boat and instead focus on what's important. Like learning JavaScript so you can write interactivity for your websites.

As an aside:

Prototyping (some might argue that this is good for scripting only)

Sorry, prototypical OO is a solid construct and very powerful. Definitely read up on it.

haven't really done much front-end web development beyond Html5

If you don't know javascript, you haven't done HTML5.

Kai Sellgren
  • 27,954
  • 10
  • 75
  • 87
Raynos
  • 166,823
  • 56
  • 351
  • 396
1

My worry with languages like Dart and say, CoffeeScript is that although they may bring out the nice things of Javascript and let you write applications more quickly and reliably, in the end it's still compiling to Javascript.

I feel you should have at least an intermediate understanding of how Javascript works before diving into those, but I may be in the minority here.

Bartek
  • 15,269
  • 2
  • 58
  • 65
  • Why worry? If this *wasn't* the case, **nobody would use CoffeeScript**. :) The advantage of making a Dart "cross compiler" is that, well, Dart may get used: that is, it would be "just another failed language" without such an integration approach. (Although Dart has higher aims: a specialized VM/Engine.) –  Nov 02 '11 at 02:34
  • (That is, "JavaScript as an IL" is just a means to an end; many people use Java without knowing C and many people use C without knowing assembler and so forth...) –  Nov 02 '11 at 02:40
  • CoffeeScript is essentially syntactic sugar for JavaScript that in many cases has a tight mapping/correlation to what the final JS will look like. And you can intersperse regliar(sic) old JS within. It's a different thing. – Greg Pettit Nov 02 '11 at 02:54
  • @pst people who do programming without knowing C/low-level languages are just programmers by coincidence. – Raynos Nov 02 '11 at 03:05
  • @Raynos Unless they first learned Haskell ;-) But really, how am I supposed to argue against that? :( –  Nov 02 '11 at 04:59
  • @pst you go to [JavaScript chat](http://chat.stackoverflow.com/rooms/17/javascript) and then argue with nonsense all day. – Raynos Nov 02 '11 at 11:33
  • As far as I gathered so far, Coffee Script and DART two completely different things all together. `..they may bring out the nice things of Javascript`. DART in it's basic intend is an alternative to JavaScript not to build on top of it or enhance it. – Nope Oct 12 '12 at 12:20