What I’ve learned, though, is that it’s actually a reasonably decent
language — yes, it has some misfeatures, and some things don’t behave as
I think they should (
for (i in object), for example, which sets
the index of the member, not the member itself like in python or sh).
They’re fairly minor, though, in my opinion, compared to some of the
good features, like functions being first-class objects that you can
pass around, for example as event handlers. (I know that quite a few
Even discounting Internet Explorer for the moment, things aren’t perfect; I’ve run into problems because, for example, Firefox allows things that Opera doesn’t, when Opera’s behaviour is actually the correct behaviour (but of course, I can’t code to Opera’s strict standards-compliance, because discounting Internet Explorer was only wishful thinking, and IE7 doesn’t support the correct way of doing things that Opera mandates).
Not supporting large chunks of the DOM (DOM level 2 or 3, if I remember
correctly) is okay, though, because I can just extend the
to provide wrappers — if
getElementByTagNameNS isn’t defined, fake it
getElementByTagName instead. But oh, wait, Internet Explorer
doesn’t let you extend the built-in DOM objects. Why? No idea, but it
means that I have to write a wrapper function for every browser to use,
even if it supports the necessary methods natively. So much for that
Then, when something goes wrong — and it will — you’re sort of stuffed.
While Firefox has Firebug, which isn’t perfect but does the job well
enough, and Opera has Dragonfly which was great while it worked but
seems to have broken for me, Internet Explorer has…nothing. As far as I
know. Extensive Googling has, at least, turned up nothing. IE7 seems to
least is more than
ed, which makes do with one —
? — but they aren’t
much more helpful), so it’s back to
alert() and popping up the value
of variables at a dozen different points throughout the application. (I
assume Microsoft expect people to fork out for Visual Studio or
something to get access to a debugger. Sod that, all I want is useful
error messages and a DOM inspector)
Update: Simon points out that IE8 does no better on the Acid3 test than IE7, but suggested the Internet Explorer Developer Toolbar from Microsoft; I’ve not yet had a chance to test it.