The Dart programming language
I might be completely wrong here, but I’m starting to think Google’s Dart language is solving the wrong problem.
I mean, Dart is beautiful and much cleaner than JavaScript, but as a developer that’s not solving the immediate problems I face.
The problems I see with current web development include:
- Your code has to be split into server-side code (e.g., in PHP) and client-side code (in JavaScript), which is annoying because it separates the logical flow of your code. Dart does not seem to solve this. (You could imagine a language that compiled down to PHP and JavaScript as required.)
- You need jQuery all the time for modern websites, yet jQuery is not integrated into Dart from the outset. I think they’re planning to implement a completely new way of achieving the same, but until that’s ready, it’s hard to assess whether it’s better or worse. It would be nice to have a web language that integrated jQuery-like functionality from the outset.
- Related to this, you typically use many JavaScript/jQuery libraries to implement menus, clocks, menus and such things. It appears these won’t be accessible from Dart, which will make it useless for advanced websites until replacement libraries have been implemented.
- It’s really hard to write code that runs on every browser dating back to IE6. Dart does explicitly not solve this issue; in fact, they don’t even seem to support modern versions of Internet Explorer at the moment. As far as I can tell, that would mean that you’d need to write your site twice, once in Dart and once in Internet Explorer JavaScript, which is really not ideal.
- They seem to expect most programmers will put Dart into their websites in the same way you use JavaScript at the moment. However, for efficiency it’s not great to upload actual source code – it’s much better to upload a minimal version as created by Google Closure. It would therefore be fine to have a language (such as Dart) for developing sites but still uploading JavaScript to the actual website.
I think that what I’m trying to say is that I’d love to have a language somewhat like Dart for writing websites in, but I’d love that language to compile down to efficient JavaScript (with jQuery) and PHP, especially if the resulting websites would work with all browsers dating back to Internet Explorer 6 (and in cases where that wouldn’t be possible, you’d get compile-time warnings about using features requiring a modern browser).