People call it an object because that is what it is. If your code is using Javascript objects as general purpose hash tables with the normal syntactic sugar then your code is broken[1]. The correct way to use an object as a hash table involves a bunch of ugly extra syntax that makes it more verbose than hash tables in any other language I'm aware of.
[1] http://www.devthought.com/2012/01/18/an-object-is-not-a-hash...
Every programming language leaves you a flavor in your mouth, it can be bitter and sweet. I like the idea of having living object in the DOM, it feels a little bit like smalltalk from a distance. but the language itself? I prefer to run a neutral VM or a secure native client in the browser to run other languajes.
Let's say originally you have this.
// Run node to the end
for (; node.next != null; node = node.next);
doSomethingElse();
After a few months of team work on the same code, one day, somebody got careless with the "x" key in vim and deleted the semicolon after the for. // Run node to the end
for (; node.next != null; node = node.next)
doSomethingElse();
And your web page still works! It's just become mysteriously very slow, sometimes. Must be caused by the latest Chrome update.There're lots of other ways for a pile of JavaScript code to accumulate bugs like this over time without a strict standard in place to lint everything. e.g. people forgetting to add "var" before variable declaration because they've been writing Python as well, causing namespace leaks that DON'T seem to break anything at first.
If you team has a standard practice to always lint everything, always do data binding in a certain way, never modify the DOM directly (combined with the proper libraries), etc. Then, yea, maybe you can scale up your team and the code size without always fixing funny bugs that pop up only after the original mistake was made 6 months ago.
But, standardized development practice with JavaScript? hmm.... how many hotshot frameworks and major updates to hotshot frameworks have we seen in the past 2 years? Compared to that, people using inheritance carelessly is just a minor problem.
Not to detract from the subject at hand because you do have a point, but that sort of error is caught by patch reviews. Even on my own projects I review diffs before/after I commit them.
The nicest part of it is the built-in hash table type and the related syntactic sugar that everyone for whatever reasons insists on calling "object".
One thing that makes me freeze right up, though, is I hear they're adding classes and inheritance and that whole OO clusterfuck to what's a nice, trim little dynamic language.
Like the article, I think it's possible to write good code in JS as it is, by accepting what it is, rather than trying to force it to be an OO language, by emulation or extension.