4 ms·
There's a theory that languages hitch a ride on platforms that do something useful, as a way of "scripting" (customizing or configuring) that platform. The obv
by 6ren 14y ago
There's a theory that languages hitch a ride on platforms that do something useful, as a way of "scripting" (customizing or configuring) that platform. The obvious one for Javascript is the browser, but we can see others: C for unix; perl and PHP for the server-side; ruby for rails; objective-C for iOS; C#/VB for Windows/Office and so on. Though not all languages seem to fit this, e.g. Java.
I think it's actually an instance of the simple idea that products are only adopted when they meet a need - an "application" of that product. Hence the term "killer app" for a new technology. Platforms are often products that are needed in themselves; therefore, anything that improves them a bit, expanding their capabilities and usefulness, is also needed. It seems quite common that a language, in itself, doesn't meet a particular need; similar to the idea that code, in itself, doesn't solve problems; and pure mathematics, in itself, isn't of practical use. All these need to be applied to a problem. (Of course, some people do adopt all these despite their "uselessness" - it's just that this is a tiny minority).
In addition, people need to know about it (you can't adopt a compelling solution to your urgent problem if you've never heard of it). A successful platform helps here too - its scripting language is right there, installed, ready to use
even before you need it.
In the case of Java, it seems to be have been useful in itself, because it was safer and easier to use than C and C++; it rode the rise of "OOP"; had a reassuring industry backer (Sun) and complete toolchain, libraries, support; and was heavily promoted by Sun. At that time, python, ruby and javascript were slow (because of slow hardware and lack of optimization) and C# didn't exist.
BTW: A blog/essay introduced the term "scripting language" to describe C (which is striking because C is not one, by the usual definition), but I've not been able to find it since.
So people bend over backwards to make javascript workable, improving it, adding libraries, finding the good parts, writing front-ends for it, writing back-ends for it, because it is the scripting language of the browser. If you do all that, is it still javascript? Yes, in that it uses the adoption channel of javascript, and maintains compatibility with javascript as an interface. So Javascript is no longer a thing, but a conduit - a platform customized by other scripting languages.