Infrequently Noted

Alex Russell on browsers, standards, and the process of progress.

Comments for Is JavaScript the most successful scripting language ever?

DOS batch files are supported on every DOS, Windows, and probably OS/2 machine. That's gotta beat the UNIX shells, but it's a pretty braindead "language", I'm not sure it qualifies on technical grounds.

I can't imagine that JS wins any lines of code wars, it's traditionally so rarely used for anything of significance. Would the C preprocessor count as a scriping language? There's a lot of those :)

Per Hixie's take in Google's web authoring statistics which examined 1 billion documents,

"script tags are used on roughly half of" the web pages in the world.

Handwaving a little, I would argue that the web has the greatest corpus of documents we have seen with the widest range of authors.

Q.E.D. ?

If I were looking at strictly scripting languages, I'd think Perl might be the most successful. There's really no debate about whether or not it's a scripting language. Think about every Linux/Unix server just on the internet. Not all of them are serving pages that contain javascript, but I bet all of them have a Perl script running on them.
by Scott at
oh come now, we use javascript because we have to.
by grumpY! at
grumpY!: I don't dispute that. What I'm asking is *not* "is JavaScript the best language ever invented and do you like it". What I'm asking instead is "in spite of any warts it may have and despite the utter lack of respect it gets, is JavaScript still more successful than all of it's peers?".

Liking it is not apropos.

by alex at
Scott: Perl may indeed be installed on every Unix box recently built (including all variants of OS X), but Python passes much the same test. However, I have to strongly believe that the sheer number of Win98+ boxen alone would quickly trounce that number. Furthermore, when you consider that adding Acrobat and Firefox adds two more JS interpreters to those boxes, Perl, Python, TCL and Shell seem pretty outclassed in terms of distribution.


by alex at
I use Perl because I have to. I design heavy front ends because by comparison, JavaScript is an absolute joy. What would be interesting is if there came a day when we could use JS on the back end as well.

To get back on topic, I think bash and perl would be considered "more successful", especially considering how much competition they've had in the same space.

In that sense, grumpyY! has a point: JavaScript has little competition. You could count Flash and if you're stretching, JScript. Maybe even Java applets (interpreted bytecode, not really a script per se).

So if you're asking whether it's most successful on the grounds of it being far and ahead the leader in its domain, and limiting the contest to the most widespread scripting environments, I think you could make a very good case.

by Mike Ter Louw at
Another important measure of the "success" of a language is the diversity of applications it is used for. JavaScript falls far short of bash, Python, and especially Perl in this regard I think.
by Aaron at
Nice topic sentence btw :-) You're improving.
by Aaron at

Well if the definition of "success" is "installed in the most places. Then the DOS batch language, and every autoexec.bat written with it, wins with VBScript a close second I guess. Perl has been around a lot longer than Python, so even though they may both be installed by default on *nix boxes now, that wasn't always the case. I'd still classify Perl as the most successful because my definition of sucess includes not only "most installed", but "most used overall.". Javascript is the first thing you think of when you need to make a web page beep, but Perl is the duct tape holding most systems together. ;)

It's all about context.

by Scott at
You can't really count Bash per se, it's a bunch of non-standard extensions to the Bourne shell, which is in the POSIX standards.
by Jim at
Interesting question. I know that FORTH has been used a lot in embedded systems over the past 25+ years — it was invented as a telescope control language — so I suspect that there might be a number of ubiquitous devices running FORTH (cars? microwaves? shavers?) that would trump the number of DOS/Windows PCs ever sold.

Plus, just on principle you have to honor FORTH for remaining resolutely Old School and not succumbing to ephemeral fads like named local variables or infix notation.