The lack of a class system and an import system means that a lot of libraries reinvent the wheel
I consider the lack of a class system a feature, not a bug, and Javascript itself one of the most fortunate accidents in computing history.
We're really lucky that Brendan Eich happened to have read some SICP and been in a Scheme-enthusiasm phase when he got the job of making a language for the web. Because of this, Javascript contains the messenger RNA of Lisp and Smalltalk and their regular, ultra-dynamic approach to programming - and because of that, it's taking over the world.
Of course it's half-baked in some ways, some of which go back to the C-syntax that was politically imposed on it. But we owe the world of web apps, full of incredible creations that go light years beyond anything that the browser was originally designed to do, to the dynamicness and extensibility that did make it into the language. (And that took 10 years for people to begin to figure out.) This recent talk about libraries and language extensions built on top of Javascript is missing one essential point: it's because of its expressiveness that we can build all these interesting abstractions.
When you consider how many historical and political accidents have gone against this style of programming, how poorly understood it has been and how nearly everyone thinks that to make things "serious" they have to redo it in concrete, we're really very fortunate that even one accident - and one of the biggest - went in our favor.
And I do think it was more or less an accident. Lord knows Eich has since spent years trying to turn the thing into Java. To support "serious development" don't you know.
Even machine code vs C is a leaky abstraction which is why people use it. It is making tools that compile the code properly and allow proper debugging that is the problem. I suspect things might improve if and when these newfangled javascript engines provide some standard bytecode that supports metadata for debugging.
2 comments
[ 0.24 ms ] story [ 15.3 ms ] threadI consider the lack of a class system a feature, not a bug, and Javascript itself one of the most fortunate accidents in computing history.
We're really lucky that Brendan Eich happened to have read some SICP and been in a Scheme-enthusiasm phase when he got the job of making a language for the web. Because of this, Javascript contains the messenger RNA of Lisp and Smalltalk and their regular, ultra-dynamic approach to programming - and because of that, it's taking over the world.
Of course it's half-baked in some ways, some of which go back to the C-syntax that was politically imposed on it. But we owe the world of web apps, full of incredible creations that go light years beyond anything that the browser was originally designed to do, to the dynamicness and extensibility that did make it into the language. (And that took 10 years for people to begin to figure out.) This recent talk about libraries and language extensions built on top of Javascript is missing one essential point: it's because of its expressiveness that we can build all these interesting abstractions.
When you consider how many historical and political accidents have gone against this style of programming, how poorly understood it has been and how nearly everyone thinks that to make things "serious" they have to redo it in concrete, we're really very fortunate that even one accident - and one of the biggest - went in our favor.
And I do think it was more or less an accident. Lord knows Eich has since spent years trying to turn the thing into Java. To support "serious development" don't you know.