Is JavaScript the most successful scripting language ever?

Aaron says I need to work on my slug sentences, and I agree. On reflection, I suck at writing almost *any* kind of sentence. I guess I shouldn’t expect slugs to be different.

For a couple of years I’ve been akwardly saying things like “and I would suspect that JavaScript is the most successful scripting language ever” or “I don’t really have any hard numbers, but JavaScript seems incredibly successful as a language”. Note all the hedging.

What I would like to know is this: on what axis is JavaScript *not* the most successful scripting language of all time? Can some other language beat JS in:

  • implementations of a ratified language spec (scheme? lisp? do they even “count”?)
  • interpreters deployed (Forth is in every Apple and SUN bios…can that possibly beat the distribution of IE, Firefox, and Safari?)
  • lines of code written for said language

Perhaps KSH and/or bash would win? I’m curious to know if anyone can think up other strong contenders.

12 Comments

  1. Posted February 20, 2006 at 1:44 am | Permalink

    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 :)

  2. Posted February 20, 2006 at 8:02 am | Permalink

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

    http://code.google.com/webstats/2005-12/scripting.html

    “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. ?

  3. Posted February 20, 2006 at 10:55 am | Permalink

    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.

  4. grumpY!
    Posted February 20, 2006 at 4:34 pm | Permalink

    oh come now, we use javascript because we have to.

  5. Posted February 20, 2006 at 4:42 pm | Permalink

    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.

  6. Posted February 20, 2006 at 4:46 pm | Permalink

    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.

    Regards

  7. Mike Ter Louw
    Posted February 20, 2006 at 7:25 pm | Permalink

    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.

  8. Posted February 20, 2006 at 8:59 pm | Permalink

    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.

  9. Posted February 20, 2006 at 9:00 pm | Permalink

    Nice topic sentence btw :-) You’re improving.

  10. Posted February 20, 2006 at 10:04 pm | Permalink

    Alex,

    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.

  11. Jim
    Posted February 22, 2006 at 3:30 pm | Permalink

    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.

  12. Posted March 9, 2006 at 12:00 am | Permalink

    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.