Hacker News new | ask | show | jobs
by db48x 1473 days ago
I was there when E4X was introduced, about 20 years ago. It lasted about 5 whole years before people started to think it was old and crufty.

https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Rel...

1 comments

E4X couldn't really be used - it was never available enough (just one major browser) and there was no polyfill or to-JS compiler (those things weren't common at that time).

Had E4X been more widely released, I might have used it, as might many others. In retrospect, though, it's probably good that it didn't catch on, as it introduced a lot of extra syntax and operators, like a.@b, a.@*, a.*, a.b::c, a..b, a.(@b==x) and had semantics that affected large parts of the JS Runtime (how the delete operator works, how calling works, what += means, and so on).

Some of those operators would have been pretty useful, though the ones for dealing with xml namespaces wouldn’t be.