Dart fixes a number of problems with Web programming, but introduces new problems of its own
Google Dart: Structure and freedom
I've worked on several teams where the leader was a real whip cracker who drafted long lists of annoying rules. Each statement had to be on its own line. Each constant had to start with a certain letter. There could be no chaining of method calls because it made stepping through the code difficult during debugging. Everyone hated the rules and the rule maker, but the code was much more consistent and readable.
Dart seems to be taking the opposite approach. There are often several ways to say exactly the same thing. Functions are first-class objects and they're tossed everywhere. Constructors take various forms. Of course you can also get your own whip cracker to come up with tough rules and jam them down the throats of the coders, but we can already do that with the existing languages. If anything, Dart is offering more ways for programmers to develop their own secret idioms, then get cheesed off when the other coders can't grok their infinite coolness.
Dart's simplicity is not always an advantage either. The Dart team tossed away the word "function" from the declaration of a function; now all you need to do is list the parameters between parentheses. As I read the Dart code, I found myself thinking like a parser to determine whether the parentheses were declaring a function or acting algebraically. The word "function" may be a pain to type repeatedly, but it's a helpful marker when you're reading the code. What speed we gain when writing the code, we lose when reading it. (Of course if you're really going to ignore the type system, you can just create a new class called "function" and have every method return it.)
It may be my inexperience with Dart, but at times I felt like I was dealing with the same kind of mad geniuses that invented Lisp or APL. They too worshipped the beauty of some minimal collection of keystrokes that were actually intricate mechanisms delivering the answer with deft precision. Yet those languages have been disasters in corporate environments. The fun that lone programmers can have with clever code tropes can't make up for the confusion that everyone else in the team feels until they figure out the inside move.
Google Dart: A cleaner Web
The developers of Dart heard these cries and added most of the goodness from these libraries to Dart. They've gotten rid of the lengthy names like
getElementsByTagName and replaced them with a catch-all function called
query that takes jQuery-like parameters to find what you want.
They've also smoothed out the internal data structures describing the DOM. The fields of each DOM element now use standard data structures. That means you don't need to remember method calls like
firstChild. You just need to know that there's a field "node" that responds to the standard collection methods. These seem like perfectly obvious solutions and I'm thrilled with them.
You may still be better off sticking with Win7 or Win8.1, given the wide range of ongoing Win10...
Microsoft buried a Get Windows 10 ad generator inside this month's Internet Explorer security patch for...
Here’s the best of the best for Windows 10. Sometimes good things come in free packages
The creator of Linux talks in depth about the kernel, community, and how computing will change in the...
The latest additions to Google's mobile OS should give you plenty to chew on
The open source operating system celebrates its 25th anniversary this month
Google's gRPC aims to oust JSON for exchanging data between HTTP-connected services