Posted: 06 Apr 2012 04:00 AM PDT
What Is Dart?
Straight from the horse’s mouth (which is located here):
If that’s a great, steaming pile of mumbo-jumbo to you, allow me to paraphrase the above.
Single-inheritance: Classes can extend other classes, but only one at a time. This is a common structure in Object-Oriented Programming. A rare few languages support multiple-inheritance, but the general consensus is that that causes more problems than it solves, so most OOP languages go for single-inheritance.
Optionally typed means, as you may now guess, that you have the option declaring a type for variables. It’s as simple as this: you can leave the type off, and the compiler won’t do any extra checking. If you supply a type, then the compiler will help you out with errors. ActionScript is an example of another optionally typed language.
Reified generics: Generics are a language feature that allow you to type the elements of a collection. For example, an
Interfaces: An interface is a handy Object-Oriented technique. It defines a type without defining functionality. It’s uses are hard to sum up in a sentence or ten, suffice it to say that they are integral to advanced (and clean) Object-Oriented Programming techniques (namely design patterns). Once you grok interfaces, you’ll lament the lack of them in other languages.
Statically checked: This goes back to the typing thing. When typing is in use, a variable with a type is considered “statically typed,” and as such the type can’t be changed once it’s been declared. This allows the compiler (or “static checker”) to make assumptions about your intentions with your code; that is, if you declare a variable as a
So What Is Dart Really?
Yes, I had to provide the “official” explanation of Dart. But that may or may not satisfy you. Here’s what Dart is, with the typical web developer in mind.
So, whether or not Google gets its way, it is certainly possible to write Dart projects for the web today, and we’ll do just that by the end of this tutorial. Hopefully, along the way, I’ll convince you that Dart is actually pretty promising.
What’s Wrong With Dart?
Lastly, Dart is currently in development. That’s exciting, and it’s not something “wrong” with Dart per se, but if you start developing in Dart now, there’s a certain chance that the API will change, or that things won’t be documented fully or correctly, and the amount of information on the web is less than, say, the amount you can find about jQuery. It’s bleeding edge, and that may not be for you, or for a given project.
What’s Awesome About Dart?
At the same time, it’s bleeding edge, and that’s awesome. Investing in a little time now to learn Dart could put in a nice place once Dart is more stable. If you get involved now, you even have the opportunity to help shape the language. The Dart mailing list on Google Groups often has some back-and-forth between people suggesting ideas and Google engineers responding to that idea. Often user-contributed ideas are considered and it’s not uncommon to see them incorporated.
I’ve already discussed the advantages of a typed, object-oriented language, and it probably goes without saying that those traits are also awesome.
Should You Care?
This is, of course, a loaded question, and I’d be inviting a comment-based Inquisition no matter how I answer. But answer I shall.
You’ll probably already care, or not care, depending on how much you’re bothered by Dart’s problems, or excited by Dart’s advantages. The previous two steps give you plenty of information the lead you to your own conclusion.
Having said that, I feel it’s always worth learning about new stuff. You may learn that the new thing isn’t worth your time, but you should formulate that opinion on your own, through experience. We’ll provide some experience in this tutorial, so if you’re feeling adventurous, get ready for Dart.
This brief discussion of Dart has hopefully sparked your interest in this new language that may or may not take the web by storm. If you’d like to try it out, take a look at my Facebook-exclusive tutorial that will get your hands dirty with a simple Dart project.
(If you’re not on Facebook, don’t worry. The tutorial will be on the main Activetuts+ site eventually, and we have plenty more Dart content lined up in the mean time.)
Thanks for reading! Share your opinions about Dart in the comments.
|You are subscribed to email updates from Activetuts+ |
To stop receiving these emails, you may unsubscribe now.
|Email delivery powered by Google|
|Google Inc., 20 West Kinzie, Chicago IL USA 60610|