Dion Almaer posted a great interview with Steve Yegge concerning his port of Ruby On Rails to Javascript - “Rhino On Rails“.
Rhino On Rails sounds incredibly cool, but I wanted to talk about some of the other stuff Steve mentions in the interview.
Some people think that the web needs a new architecture:
Web development is unimaginably obtuse nowadays.
- HTML wasn’t designed to do the pixel perfect presentation that everyone seems to want out of it, so you have to hack your way around.
- Web browsers aren’t compatible with one another, and as a browser vendor you have to emulate bugs in the market leader in order to render sites correctly.
- Progress is slow - 5 years in between IE 6 & IE 7, standards bodies that sit on non-relevant standards for years (e.g. The CSS Working Group).
- A large number of uninformed developers, which is magnified by the leeway you have writing incorrect HTML & JS while still having it render with no warning in the browser.
It’s tempting to think that maybe some uber-hacker can come along and design a “new standard” that everyone will suddenly start using. Something clean and fun to use, which solves the real problems people have.
Unfortunately, I don’t see this happening any time now. For something to replace the HTML,CSS,Javascript trifecta it’s going to have to overcome one heck of alot of legacy. The web, as currently defined is ubiquitous - it’s in our PCs, phones and toasters. For something new to take hold, it would have to be at least 10x better, and have very good PR. It would also have to be an OPEN standard, as even a very large company wouldn’t have the resources to write enough good implementations.
Unfortunately I don’t see any of this coming.
Server Side Javascript:
Steve says that after you get used to it, writing server side javascript isn’t that bad.
What bugs me about client side Javascript is things like:
a = function(){return 1;}
()
Because Javascript tries to be smart and inserts semicolons for you, in the above example a is equal to 1, and not an anonymous function that returns 1 as you might expect. Oh wait… That’s actually 1.0000f - Javascript currently only supports floating point numbers and has no int type. It makes me cringe thinking of the subtle bugs you can encounter due to quirks like this.
I hope they’ve solved that in Rhino and/or EC4.
Steve is excited about D:
That really brought a smile to my face. D looks like it’s shaping up to be a worthy successor to C++. It still has a long way to go, and allot more support to garner, but if Steve’s excited about, there appears to be hope
.

{ 3 } Comments
This link-compatibility-with-C++-thing, you just can’t do it, I mean it’s amazing that Steve Y suggests it. I’ve read most of what he’s published and he said he wasn’t using STL somewhere; well, it shows in this case, ’cause in STL, most of your problems are compile-compatibility - to call it, your compiler has to parse the templates and then implement the C++ template instantiation, specialization selection and overload resolution rules, all before you get to link time stuff. And STL is a tame example by modern standards. To interact with C++, you ought to be C+=2 - a full superset of C++.
D rules. C++ is good for fertilizer. D programmers around the world, unite!
The fact it’s impossible to define a portable interface in C++ is really sad.
But what if we limited ourselves to linking with simple classes that only accepted C types? Or some other similar subset of C++?
But if some subset was compatible, would that help? Would it even be interesting?
It really depends on what the popular libraries are doing, or what the libraries used in a company X are doing. I don’t know; I think that a template or six tend to sneak in these days, and that you absolutely have to support the STL container types (which is probably on the border of “possible without having a full C++ front-end”).
When I think about it, the strength of C++ lock-in is amazing. I mean, you have Wine on Linux, but you don’t have that easy a way to interface with C++ libraries from Java. Captures one’s imagination.
Post a Comment