Newspeak Won’t Reinvent the Web
Posted in Code, Theory on July 21st, 2009 by Peter Wooley – Be the first to commentWhat George Orwell may not have realized when creating 1984’s Newspeak was that a language that could shrink rather than grow might actually be a good idea. For the past two years, Gilad Bracha and a few other folks have been working on a new programming language, called Newspeak, that might actually be able to start off with a mind-bendingly huge feature set, but do it all with just a few brilliant concepts and stay remarkably small in the process.
Josh, a co-worker of mine and a Serial Language Enthusiast, let me know about this new development. Part Smalltalk, a splash of Beta, a helping of Self, and a sprinkling of Pixie Dust makes this language one to take a look at. In Episode 140 of Software Engineering Radio, Gilad explained the concepts of the language. Three things jumped out at me:
- Class hierarchies, as in Classes within classes within classes. Classes, Modules, Namespaces, and Mixins are all handled with the same construct. Top-level classes are Namespaces and you can have multiple instances of these as Modules—giving you side-by-side deployments—and Mixins come by default as all parent classes are dynamically set at runtime.
- Dynamic Typing is used, which I love, but they’re working on implementing Pluggable Types, an optional typing system that will allow custom type grammars. Though, keeping a dynamic runtime, the types will only be checked at compile time, which is basically the opposite of ActionScript 3 running without strict mode.
- Network Aware. The language knows the Internet, as indicated on the Newspeak homepage:
…we believe in a notion of service oriented computing that allows for off-line operation and leverages the inherent advantages of client devices, while utilizing the strengths of the network.
For someone working on the web, this is exciting stuff. Going beyond simply being aware of the network, Newspeak will not only sync with data from the cloud, but with the entire application—running application code client-side. It’ll be like updating the latest version of TweetDeck through AIR’s update system, but only the modified application objects and data will be sent over the wire. Now this next part is purely conjecture, but as multicore processing will be a focus of Newspeak, an implementation of Erlang-style actors may not be out of the question, and hot-swappable code could make the entire update process as smooth as butter.
What I have to disagree with
From Episode 140 of Software Engineering Radio (starting at 2:06), Gilad says,
The real goal of Newspeak is to create a really nice environment where you can program for the web without worrying about the web, without dealing with all the mechanics of different languages: CSS, HTML, DOM, Database back-end, whatever. In general, to create a language—not just to run in a web browser—but a language for a network world.
Hold it right there! Newspeak sounds like a great idea, but I’m not convinced it will allow people to “program for the web without worrying about the web.” If anything, this sounds like ASP.NET and its automagic markup, styles, and scripts that makes kittens cry. While the day may come when HTML will be treated as the Assembly language of the Web, we are far from it. With so many browsers, so many brand new ideas, and so much further to go in nearly every aspect, from content, accessibility, features, and speed, we’ll be lucky if we get there by 2030, when IE finally implements the CSS3 Template Layout Module.
By then, I will most likely be the old, cantankerous coot that still remembers the days when developers knew why you put the <script /> at the bottom and how to style a <ul /> to make drop-down navigation without JavaScript. But, with HTML5 still on its way and CSS3 being slowly implemented module-after-module, I doubt I’ll have to be very cantankerous anytime soon. Until then, I’ll be playing with a new language and seeing what this Internet fad can really do—even if it isn’t reinvented by Newspeak.