Linked by Thom Holwerda on Fri 20th Dec 2013 07:53 UTC, submitted by Hiev
General Development

Google believes Dart speeds up both developers and the programs they write, but skeptics worry that it fragments Web programming and undermines the industry's focus on better JavaScript. So far, it's been a largely academic debate, but that will change in coming months.

That's because Google right now is building Dart technology directly into Chrome.

Does anyone here use Dart?

Thread beginning with comment 579206
To view parent comment, click here.
To read all comments associated with this story, please click here.
protomank
Member since:
2006-08-03

Let me clarify: it WAS a language I liked and loved. It grow up to be a ugly monster that eat little kids.

Take, for instance, its object/pseudo-class implementation, it is a nightmare if you are not the one who developed the original code - commong thing in industry, you will always ending with tons of old code someone else wrote and did not care to document. The lack of types, mostly in the object case, is also very bad for mantaining large pieces of code.

Also, it is very easy just say "people don't use the right way" and do not face the problem: people CAN use it in the wrong way very easily.

Reguards.

Reply Parent Score: 5

lucas_maximus Member since:
2009-08-18

I seen horrible things done in Java and C# code bases, it isn't the language it the programmers and you can't blame the language.

Edited 2013-12-20 14:44 UTC

Reply Parent Score: 3

protomank Member since:
2006-08-03

I bet I've seen worse thing in more "evolutionary" and flexible languages like C++ and PHP ;)

Reply Parent Score: 2

Alfman Member since:
2011-01-28

lucas_maximus,

"I seen horrible things done in Java and C# code bases, it isn't the language it the programmers and you can't blame the language."

Obviously languages are subjective, but in principal there's no reason you cannot blame the language for it's cons just like protomank did. Ie having too many ways to do the same thing, confusing abstractions, just look at perl. Also, just because I can personally use the subset of the language that fits my personal preferences doesn't mean I won't have to use other code at times.

It's outright lousy that javascript doesn't have better namespace support. For both performance and coding standards, I prefer a language to have strict typing and static objects, yet with javascript I have no guarantees about any object. Even if I see where an object is declared, I cannot tell if an object has other properties dynamically added somewhere else using dynamic assignments and/or prototypes. I cannot prove the type of any variable without analyzing the entire JS codebase. Since nothing is statically enforced in the language, it makes it much more difficult to predict how a small snipit of code will execute without understanding the program as a whole. JS cannot effectively be "unit tested". This is a con not shared by static languages such as Java/C/C#/etc.

What makes javascript hard to predict for us as humans also affects the javascript JIT VMs too, which is the whole motivation behind asm.js - "don't use these features of js because we cannot convert them to static code".


I don't think javascript is so bad for how it's typically used, but I do think it is bad for the high performance and complete application programming environments that it's being pushed towards. When it comes to robustness, compilers are worth having since they can verify a great many problems that would not show up at all in a JS program until the faulty code executes. As always, the best answer it to choose the language that fits the project. Javascript often gets used because there's no other choice when it comes to native browser support. If I had a choice, it would probably be C#/mono.

Reply Parent Score: 3

galvanash Member since:
2006-01-25

Take, for instance, its object/pseudo-class implementation, it is a nightmare if you are not the one who developed the original code


I respect your opinion, so please don't take offense.

Looking at JavaScript and calling its object models "pseudo-classes" demonstrates you have a strong bias towards class based languages. That's fine, to each their own - but prototype based inheritance is not an after-thought or a whim, it was absolutely intentional and is really kind of the fundamental point of JavaScript (it is, after all, a scripting language).

You can model virtually any OO concept (inheritance, polymorphism, encapsulation, Superclasses, subsclasses, factories, etc.) through two simple mechanism in JavaScript - cloning and prototype manipulation, and importantly, both are purely runtime operations...

I'm not saying this approach is necessarily better or anything, but it is powerful. People think of Javascript as a rather simple high level language when it fact it is the opposite - Javascript is like assembler for OO programming. It is actually an extremely low level language, because everything is built up through a very small handful of language features.

Javascript can be molded to work in a variety of ways, it is great for meta-programming, it is great for scripting, etc. It can be great for application programming, in much the same way that Python and Ruby are, but its low level nature makes it quite a bit more quirky. It probably isn't something you would want to classify as a "general purpose" language, but that doesn't make it bad.

commong thing in industry, you will always ending with tons of old code someone else wrote and did not care to document. The lack of types, mostly in the object case, is also very bad for mantaining large pieces of code.


JavaScript has types, it just doesn't have static typing...

I would argue (and have many times before) that static typing is primarily a performance optimization, not a feature. Thing is that there are two schools of thought on this, and I'm in the other one ;) A language that doesn't let me put whatever I want into a variable at runtime is, imo, broken. But that is because I mainly do meta-programming - and you can't really do meta-programming with static typing.

That said I understand the argument for it from the "don't let me shoot myself in the foot" point of view when doing applications/system level programming.

Also, it is very easy just say "people don't use the right way" and do not face the problem: people CAN use it in the wrong way very easily.


Ah... That is it in a nutshell I think. JavaScript biggest problem is it almost too flexible. Almost everyone uses it wrong. But when it is used right it can actually be quite elegant.

Reply Parent Score: 3

protomank Member since:
2006-08-03

Hi, thanks for your reply, and I kinda of agree with it.
Yes, I like languages with a good class semantics, but I coded a lot in plain ANSI C before, so I'm experienced with both types.

Javascript could not add a complete class, with types that can be easily tracked from a function that uses it, surely, the language was never developed with that in mind, so it had to follow the path that was created.
That doesen't mean this is the best scenario, of course, and the debuggers in browsers help you to track types A LOT.

I don't pretend to spit in the dish I've eaten before (PHP and Javascript paid com CC degree), I like to play with javascript, I think some new features like web-sockets are incredible. It is just that, Dart is better in all aspects I've ever looked into.
To be honest, I wish javascript was "fixed" on its weak points instead of a new language to be created, but I do not believe it is possible to do so, while keeping backwards compatibility.

Reply Parent Score: 2