back to article Happy silver jubilee to JavaScript, king of the web at 25 and still hanging on to its crown, for now

JavaScript turned twenty-five years old on Friday, if you count from December 4, 1995, when Netscape Communications and Sun Microsystems first announced the technology. The programming language's creator, Brendan Eich, presently CEO of browser biz Brave Software, considers May 1995 to be when the project – 10 days in the …

  1. karlkarl Silver badge

    One day browsers won't provide an embedded JavaScript interpreter or even HTML DOM. Instead they will provide a WebAssembly VM and it will be up to the developer to provide the JS / HTML language / implementation they want.

    This will be great in a few ways:

    1) Finally developers can choose what language they want for the frontend stack.

    2) Things like Internet Explorer 6 compatibility stacks could be provided for those companies still tied to it.

    I think the main question for me is: Will web browsers come by default with a basic JavaScript / HTML implementation for "compatibility with legacy websites" or with that ultimately get completely stripped out.

    1. logicalextreme

      Anybody still tied to IE6 needs to quit the "using computers in any part of the business" game.

      1. schmeckles65

        Reminds me of a system we had at our old place, would only work on compatibility mode which meant we had to push a GPO to ensure that was active on all machines.

        Granted... The system sucked and that is self-explanatory with the compatibility mode requirement.

    2. Anonymous Coward
      Anonymous Coward

      > One day browsers won't provide an embedded JavaScript interpreter or even HTML DOM. Instead they will provide a WebAssembly VM and it will be up to the developer to provide the JS / HTML language / implementation they want.

      That is indeed a plausible scenario. If things do go that way, I fear that could be seeing even more siloing and possibly a comeback of the so-called browser wars.

      1. Tom 7

        Any browser wars would be short lived. As would the internet be if everyone loaded their own code onto your machine on visiting.

  2. IGnatius T Foobar !

    Office 365 is worse than LibreOffice

    Vinegar pointed to Microsoft Office, which a decade ago ran only as native desktop software, mostly for the Windows operating system. Office now can be invoked in the browser under the Microsoft 365 umbrella, thanks to a lot of JavaScript.

    It's funny how all the people who whined about OpenOffice and LibreOffice not being "good enough" to operate in a Microsoft Office dominated world, because "document conversion is not good enough", now crow about how great Office 365 is, when the same conversion between the desktop and web versions is far worse.

    1. werdsmith Silver badge

      Re: Office 365 is worse than LibreOffice

      I’ve never heard a single person outside Microsoft Marketing crow about “how great Office 365 is”

      1. Anonymous Coward
        Anonymous Coward

        Re: Office 365 is worse than LibreOffice

        @werdsmith

        You have now.

        Cheers… Ishy

    2. bazza Silver badge

      Re: Office 365 is worse than LibreOffice

      Agreed.

      MS have done a pretty good job of the web versions of MS Office applications, in that their web apps are pretty good in comparison to many other web apps. But they're so far behind the native versions in terms of speed, feature set, usability, etc. I've yet to come across a web app, or Javascript app that doesn't in some way suck; VS Code, another hot'n'trendy example, is simply getting out of hand, bloat-wise.

      There's a reason why MS has worked to tie the native app versions into things like OneDrive cloudy solutions; it's the only way to get proper tooling "on the web". Web doesn't cut it. It's easy to see why. A fairly complete MS Office 2013 native installation weighs in at about 926MB of object code (.exe's + .dll's), and about 1.5GB of other stuff. On the assumption that about the same amount of object code would be required if the source were Javascript, a full featured web version of Office is going to be a huge amount of Javascript (many GBytes worth) plus 1.5GB of other resources. That's just not practicable.

      1. Robert Grant

        Re: Office 365 is worse than LibreOffice

        If you've used the collaboration features in the native apps and seen them crash repeatedly compared to web, you might consider them to not cut it either.

  3. Daedalus

    Good news and bad news

    Good news: JavaScript allows almost anybody to program for the web.

    Bad news : JavaScript allows almost anybody to program for the web.

    How many unmitigated disasters can be blamed on this language? How much bork results from its ubiquitous use? How many web sites are in a state where nobody quite knows how they work, or if they are error-free? Oh look, you have -32768 days left on your licence. Your address is NaN Grafton Street. etc. etc.

    Not that PHP, Python etc. are any better. Let's hear it for interpreted languages. We don't need no steenking compilers!

    1. veti Silver badge

      Re: Good news and bad news

      You can fuck up in any language of your choice. And compilation isn't any kind of magic bullet, either. Remember "if it compiles, ship it"?

      I wrote my first Javascript in 1999, which from this article makes me feel like an early adopter, although it was already pretty ubiquitous by then. It was a personality quiz that took a user's selections, did a bit of scoring, and gave a popup with their result. All good fun. But what was revolutionary about it, for me, was that I didn't need to run any code on the server, meaning I didn't have to pay extra for the hosting - everything happened in the browser.

      I think we may owe it partly to Javascript that you can now download and use so many languages, compilers and IDEs for free. 25 years ago, people charged for those things.

      1. DrXym

        Re: Good news and bad news

        Yes you can fuck up in any language but that doesn't mean all languages are as easy to fuck up. Strongly typed compiled languages will catch heaps of errors that JS simply doesn't care about. That is why Typescript has become a popular solution (to the problem of Javascript) since it "compiles" TS to JS and catches errors.

        But with WebAssembly people can use any language they like and guaranteed some of them are far easier to write good code in than JS.

    2. logicalextreme

      Re: Good news and bad news

      Wat

    3. Jonathon Desmond

      Re: NaN

      That’s it! I’ve been searching for a house name for the new build.

      NaN Railway Parade

      Perfect! Thanks.

      1. Androgynous Cupboard Silver badge

        Re: NaN

        Didn't fancy "); drop table postcodes;?

      2. Daedalus

        Re: NaN

        That should be NaN Railway Cuttings, East Cheam.

    4. DrXym

      Re: Good news and bad news

      Javascript truly is a garbage language. It was perfectly fine for its original purpose - gluing snippets of web pages together, but is just trash when we're talking Web 2.0. It is no surprise that JS has been treated as the problem to solve, be that Typescript , Coffeescript, reactive programming or whatever. Roll on the day when WebAssembly does all the heavy lifting, compiled from a proper, strongly typed language and JS is relegated back to being just glue.

    5. Robert Grant

      Re: Good news and bad news

      Python won't have ever done that. It's strongly typed. You may only find out in production, if you didn't test it, but it won't mix up types.

      1. Daedalus

        Re: Good news and bad news

        Python is strongly typed in that if you refer to something undefined for the object, it will puke at runtime. And passing things into functions is a guessing game, as no typing occurs in the definition or the reference.

    6. a_yank_lurker

      Re: Good news and bad news

      The real problem I have with JackassScript is poorly thought out initial design done in 10 days. Other languages have a much longer development time before initial release so some of the notorious JS issues are resolved in a consistent manner before being used. Now you have a backwards compatibility issue for JS engines; what version do they stop support at. Remember there is a lot of JS code that is still out there in all its horribleness.

    7. fidodogbreath

      Re: Good news and bad news

      Bad news : JavaScript allows almost anybody to program for the web.

      The JavaScript ain't done 'til the fan starts to run.

  4. Ozan

    JavaScript is fine language as long as you use it for what it is: a glue in web pages. I never understand why people used it for things like nodes.js

    1. Version 1.0 Silver badge

      Just deleted a couple of JavaScript virus deliveries from the mail server quarantine queue. Nothing odd, it's normal.

      1. Duncan Macdonald
        Mushroom

        Javascript's biggest problem

        Is the way that users are forced to run untrusted code written by unknown people to make almost any use of the Web. People have to rely on antivirus packages and browser sandboxing to protect them.

        If JavaScript was server side only then it would be far less of a security problem. (The people hosting the bad code would be the ones to suffer.) As it is, unless users are computer literate enough to make proper use of tools like NoScript and AdBlockPlus, anyone using the web runs code from unknown authors with unknown security holes. (To make it worse - dynamically chosen adverts mean that a page that was perfectly OK one minute may well serve up malware the next.)

        JavaScript belongs with VBScript and ActiveX as hazardous ideas.

        (To get an idea of how difficult it is for a web user to tell if a page has malicious JavaScript, try using the view page source option (available in many browsers) and look at the amount and complexity of the JavaScript on Google's home page. (Over 370 lines some of which are over 1300 characters long!!! ))

        In my opinion client side scripting was and remains a bad idea. Allowing dynamically chosen adverts to include their own unverified scripts turns a bad idea into a STUPIDLY BAD IDEA.

        1. A.P. Veening Silver badge

          Re: Javascript's biggest problem

          As it is, unless users are computer literate enough to make proper use of tools like NoScript and AdBlockPlus,

          I suggest you include Pi-Hole in that list, blocks a lot of those malware serving scripts as well.

          1. CrackedNoggin Bronze badge

            Re: Javascript's biggest problem

            Yes, and Pi-hole running on the house LAN covers not just the one browser, but every DNS call coming from every device on the LAN, including cellphones. I set one up over a year ago and haven't touched it since, but it keeps on working. In the meantime I've (re)installed many new browsers without having to also install adblockers.

    2. CrackedNoggin Bronze badge

      Because there are other uses for "glue" than the browser. JS (with its implicit V8 underpinning) makes it very easy to write psuedo-parallel logic, "pseudo" because the V8 engine is limited to running on a single thread. In JS you can write parallel logic specs without worrying about the tedious mechanics of thread re-entrant code. If the tasks at hand can be computed on a single CPU - done. If not, from individual JS fibers spawn system calls for real parallel processing. That's the "glue" you described.

      For example, shell scripts such as bash are glue-like scripting languages. Very convenient, but they don't scale well at all - horrible to develop or debug shell script progams requiring more the a couple of hundred lines. JS provides a scalable alternative to that, and its simple to succinctly write pipelines, subshells, etc., but with real return values and error handling, so it scales effortlessly.

      I'm not at all claiming JS is interfacially attractive or sexy, just that is highly functional in a particular way that C++, Python or similar languages are not. To be fair, that's the V8 engine and and not the JS interface, so I understand that Go, which is also has V8 underpinnings, has similar functionality.

      1. Anonymous Coward
        Anonymous Coward

        Nice insightful comment, sir. Makes a change from all the cretinous noise in these comment sections.

        Indeed, JavaScript is well suited to applications that deal heavily with asynchronous events, such as network applications, user interfaces (e.g., QML) or sensors. Its multi-paradigm nature also makes it a particularly flexible solution that adapts well to different scenarios.

  5. werdsmith Silver badge

    Absolutely love wasm and emscripten, it is the embryo of something very promising.

    1. A.P. Veening Silver badge

      Yup, more untrusted code from outside running on your computer.

      1. veti Silver badge

        I don't know about you, but my computer has almost nothing but "untrusted code from outside" running on it.

        About the only really trusted code is what I've written myself, which is a very small part of the system. And even that is dependent on the other stuff doing what I think it will.

        Javascript that runs on your system is, in principle, reviewable, and therefore as trustworthy as anything you can run from outside your own system. Of course you never do review it in practice, but that's also true of all that open-source software you're putting your trust in.

        1. CrackedNoggin Bronze badge

          Yes, so true. Ubuntu desktop installs with "tracker" up and running (tracking all your file activity, at least). Switching it off in the control panel does nothing. Uninstalling it also removes the file manager "nautilus". Internet searching reveals it can be turned off by masking the service from systemd. Opting out is hard.

          VS code installs on ubuntu as a "snap". Snaps have the ability to be installed in sandbox mode, if the snap application allows it. VS code does not allow it. So installing VS code on Ubuntu allows microsoft onto one's system. But VS code is a great tool, and receives lots of free support from people who aren't even MS employees.

      2. werdsmith Silver badge

        Nobody is suggesting it's ready yet, but if you want you can make no progress.

        1. Michael Wojcik Silver badge

          Web Assembly is "progress" I can do without.

    2. logicalextreme

      "Wasm" certainly sounds like something to do with embryos.

  6. IGnatius T Foobar !

    uniquity

    "TypeScript confers many advantages, but it loses on ubiquity," he said.

    That. Right there.

    No one, and I mean no one, is going to willingly build towards a Microsoft-only web browser. Those days are, thankfully, over. Web standards are now the universal operating system, and we like it that way. If your device has a web browser, it can run pretty much anything. Netscape is gone, but they won the browser war. The web browser is now the operating system. Now we can run all the same web apps on mobile devices, tablets, Linux desktops, and even obscure devices like smart TV's and Macs.

    1. CrackedNoggin Bronze badge

      Re: uniquity

      "If your device has a web browser, it can run pretty much anything" ... that runs on any other web browser. That's what you meant, isn't it?

    2. BrownishMonstr

      Re: uniquity

      Was Typescript supposed to replace JS, or was it just to make development easier?

      1. Anonymous Coward
        Anonymous Coward

        Re: uniquity

        Don't quote me on this, but I've always thought of it as "JavaScript for the Enterprise"™

        You can think of it as a compromise between those who favour a fast and flexible approach (works well in small teams of highly competent people) and those who prefer a more formal way of doing things (bigger teams, where inevitably the quality of the output is heavily biased towards your weakest members).

        Note: it is not actually like that, but IMO the above is as good a way as any to look at how TypeScript came into being.

        In practice, TypeScript helps with static analysis at the expense of losing some expressibility. Programmers with a Lisp background (such as myself) tend to prefer JS whereas those with a C background often gravitate towards TS.

        1. spireite Silver badge
          Joke

          Re: uniquity

          Lisp background??

          Talking about a different thcriptiing language then aren't we? Java-thcript?

      2. sabroni Silver badge

        Re: Was Typescript supposed to replace JS

        No, from what I recall it was supposed to make the IDE richer. All those types make the suggestions much more relevant.

    3. Anonymous Coward
      Anonymous Coward

      Re: uniquity

      "The web browser is now the operating system"

      That used to be the mantra of the ChromeOS guys. Fortunately, they have seen the error of their ways.

  7. StrangerHereMyself Silver badge

    Webassembly is the future

    I'm convinced that WebAssembly will supplant Javascript in a couple of years. It's much easier to code your client logic in the same programming language as the backend.

    Also, I believe Javascript is not a proper language. The idea that some companies are using it to build their LOB applications horrifies me. Haven't they considered the fact that the Javascript float type is woefully inadequate to do financial calculations with?

    1. Dan 55 Silver badge

      Re: Webassembly is the future

      Doesn't JS use IEEE 754 double precision floating point (64 bits) just like Excel?

      And if it's good enough for Excel...

      1. DrXym

        Re: Webassembly is the future

        I'm sure if you delve into the support forums you'd find people bemoaning Excel's number choice as much.

        I've run into situations with Javascript where "number" (i.e. double) isn't sufficient. For example we have some millisecond timestamps expressed as 64-bit unsigned ints generated by a backend and BigInt doesn't serialize / deserialize to JSON so we had to kludge send them as strings and special case the parsing.

        And in general Javascript's typing or lack thereof just sucks balls. Typescript puts a useful veneer of type checking onto the compiler and useful warnings which is better than nothing but it's just hiding the problem.

        1. Duncan Macdonald

          Re: Webassembly is the future

          The only way that those timestamps exceed the 2^53 limit of the Number type is if there is a large constant base value (as 2^53 milliseconds is a LARGE number of years). Use BigInt to subtract the constant base then use Number to convert the result into a usable ordinary Number.

          (Even if the timestamp is in microseconds rather than milliseconds 2^53 covers over 280 years!!)

          1. DrXym

            Re: Webassembly is the future

            I can't change what the backend produces which btw is sensible because 64-bit holds all conceiveable timestamps the product is likely to need and every sane language would have no issue with it. I should be glad it wasn't sending timestamps in nanos which the machine hardware allowed for but the backend rounded down. Another example we had was some RFID tokens with 8-byte identifiers being sent as 64-bit ints which again were mangled as numbers.

            And yes I know how to use BigInt. BigInt doesn't serialize to JSON which is the point. The language is rife with issues caused by legacy decisions and it is highlights just how crap it is. I'm sure a brief google would bring up a pile of issues people in different problem domains have encountered with number.

            1. Androgynous Cupboard Silver badge

              Re: Webassembly is the future

              Maybe consider switching from JSON to CBOR for serialization? It handle really big ints. I've literally just checked in the CBOR code to my Java Json API, it works quite nicely - switching serialization from JSON to CBOR on the web side was almost a drop-in replacement.

        2. Dan 55 Silver badge

          Re: Webassembly is the future

          If you're converting to JSON, RFC 3339 would be the way to go. Java's milliseconds since epoch is a not very human-readable representation in a human-readable file format.

        3. sabroni Silver badge
          Boffin

          Re: And in general Javascript's typing or lack thereof just sucks balls.

          Well with a detailed and persuasive argument like that I have to agree. Well done professor, though I think you're missing the word "donkey's" from your thesis.

  8. nijam Silver badge

    > "had it not been for JavaScript's ability to work about the web's limitations and defects"

    I think JavaScript caused more web defects and limitations than it "worked about".

    1. Howard Sway Silver badge

      JavaScript's ability to work about the web's limitations and defects

      This is a bit like praising a piece of string for its ability to hold up a tatty pair of trousers.

      You really need a new pair of trousers.

      Seriously, the world's most important programming languages are now Javascript and Excel macros? Give me a break, whatever happened to the idea of making an effort and learning to program properly, if that is your actual profession? Proper languages let you write programs effectively and efficiently if you know how, and a good program looks like a good statement of the actual problem it solves. Rather than the bunch of ugly spew that cobbled together rubbish using inappropriate tools looks like.

      1. sabroni Silver badge

        Re: learning to program properly

        You put a dev pipeline in place and put tests around your code so you prove that it works. The language is irrelevant provided the code behaves correctly.

        When you say "program properly" do you mean "program the way I'm used to"?

        1. DrXym

          Re: learning to program properly

          Language is NOT irrelevant. A bad language can slow development, produce poorer quality & less maintainable code, cause more bugs, and impede the final product. In other words it can cost money and cause overheads. Testing may catch bugs earlier but if the language is causing the bugs then it is still a waste of time and money.

          And JS is a bad language by any objective measure. Does it care if you call a function with the wrong number of arguments or the wrong order. No it doesn't. People shouldn't have to write a test for that sort of thing. It is why nobody in their right mind would write a large project in Javascript. At the very least they would use something like Typescript to catch stupid errors much earlier.

          And beyond that people may look at the likes of Webassembly and realise that they can write one code base that works on the front and backend (e.g. a data model and all of its validation rules and all the other calculations it may do) far more easily than they can at present.

  9. Elledan
    IT Angle

    JavaScript is for scripting HTML DOM and browser API stuff

    I was one of those who played around with JavaScript back in the late 90s, as VBS in IE slowly died off and newfangled languages like Java figured that they could rule the Web with their Applets before people yelled loudly enough at Sun to GTFO with that nonsense.

    Anyway, JavaScript. It led to things like DHTML (Dynamic HTML), which as essentially the use of JS to create animated drop-down menus and other fancy dynamic stuff on sites. You also had a few people (ab)using hidden iframes to dynamically load data from the server without having to refresh the main page before this somehow got hyped up as a 'new' thing with AJAX (XMLHttpRequest).

    To call JavaScript a 'programming language' is rather generous. It supports a grand total of two types (ASCII & IEEE-754 FP) and runs in a single-threaded fashion. It is essentially a way to allow for the scripting of actions involving the DOM (adding/removing content) and calling of native browser functions which are exposed to the JS VM.

    There's no 'standard library', and as a prototype-based language the default programming style is 'whatever works'. Over the years its shortcomings have been patched up in a variety of ways, first by making the JS VM more performant, then adding more and more native API functions, but as a JS codebase grows, it threatens to collapse under its own weight.

    Having done a few years of professional JS development for embedded purpose (yes, it exists) a few years back, it was interesting to note how the JS ecosystem has bifurcated so many times that it has become essentially non-portable. Take just the concept of 'modules'. Just about any real language has the concept of 'modules' or 'includes', where one can reference external code files. JS only added this quite recently, but not before many different alternatives were developed (AMD, Include.js, etc.) and NodeJS is essentially its own JS dialect now as it cannot and will not support native JS modules according to the project developers.

    Getting any bit of non-trivial JavaScript to run reliably across a number of browsers, headless runtimes and NodeJS was a nightmare, with the concept of unit tests clearly developed for the sake of JavaScript to have any chance of producing code that would not immediately self-destruct (quietly, JS doesn't do stacktraces) in production. We would have plenty of bug reports of issues in testing and production that would have to be reproduced using copious amounts of console.print() statements, however.

    In that regard TypeScript is amazing. Sure, the typing is optional, but you can remove the prototype nature of JS and turn it into a deterministic language, with fixed structures that have required and optional fields, remove the need to check whether the right parameter types were being passed in every goddarn function (nobody likes random '<foo> is not a function' and so on) as if one is programming bleedin' Java (Null types, etc.).

    Instead, you write the nicely annotated TS, pass it through the transpiler which will nicely tell you where you screwed up. It almost brings a tear to one's eyes when you see something like that after years of dealing with plain JS. Of course, then try to convince the customer and one's colleagues that switching to TS is a really, really good idea.

    So yeah, long story short, JS is being abused in every sense possible for all the things it was absolutely not designed or intended for, but I fear we passed the point of no return roughly two decades ago now.

    Whatever WASM will or will not do I do not know. To me it feels mostly like a way to compensate for the lack of native NPAPI plugins, but so long as every single WASM outside call has to pass through JavaScript, the real use of WASM seems to be mostly to allow for for JS frameworks to offload some sluggish processing to zippier can't-believe-it's-not-native code.

    Maybe if Microsoft grew a pair and added direct support for TypeScript in its Chromed Edge browser?

  10. Anonymous Coward
    FAIL

    Wasm

    To quote my son, who fell about laughing at this article, wasm apparently is short for "wank orgasm".

    If I tell you he is 14 I think will understand.

    Cheers… Ishy

    1. logicalextreme

      Re: Wasm

      I've got a couple of decades on him and although I wasn't aware of that (I can't think of a common enough situation that you'd be differentiating orgasm types to the point that you needed to start abbreviating), it did sound like a rude thing to me when I first read it.

  11. legless82

    I always thought the worst thing about JavaScript was the name.

    Despite having as much in common with Java as my shoes do with an Amazonian tree frog, the very fact it's called JavaScript means that recruitment sharks are unable to comprehend the difference between it and Java.

    Getting a stack of JavaScript CVs on my desk when I'm looking for Java developers and vice versa is a perennial problem for me.

  12. xyz Silver badge

    Crockford is God (IMHO)

    And OO javaScript the nads. Saying that, I'm in my "no to javaScript" phase at the moment and will only use it when absolutely necessary. Still wish HTC files hadn't died a death though.

  13. Greybearded old scrote Silver badge
    Devil

    Celebrate the day the web turned right

    That is all

    1. Greybearded old scrote Silver badge

      Re: Celebrate the day the web turned right

      I was going to write a massive rant about all Eich has inflicted on the world, but I decided it was rather depressing.

  14. alexbottoni

    The worst language ever created

    Javascript is the single one reason why I keep myself away from web development. It is one of the first languages I learned (when it was at its 0,98 release, in 1997-98), I used it for 20 years, I know it very well and... I hate it from the deepest part of my soul. I shifted from web development (after 20 years) to data science and other stuff just to avoid it. Not even Typescript (that I studied and used), nor other transcriped languages (like Coffescript), nor the most recent versions of EcmaScript (ES6 and so on) were able to fix this language. It is just unamendable.

    I never understood why Mozilla developed a browser that can run *any* language (through its "XPCOM" interface) and never supplied the developer with a real, usable way to write their software in their preferred language. I do not understand, either, why Google decided to kill Chromium and its Dart native implementation.

    While I can understand that proliferation can be a bad thing, I cannot see how choosing the absolute worst language as a mandatory standard can be considered a solution to this problem.

  15. Michael Wojcik Silver badge

    "every computing device"?

    Today JavaScript runs on every computing device

    Well, this rather casts doubt on everything else Ben Vinegar has to say, doesn't it?

    The substantial majority of computing devices here in my home and surroundings don't run any version of ECMAScript. Perhaps he's unaware that there are embedded computers.

    And, of course, there are general-purpose computers which never run ECMAScript. I don't know that I have any of those physically on the premises (I don't really have the room for 'em here), but I use some on a regular basis. For that matter, I have VMs on my work and personal computers which have never executed any ECMAScript, though I suppose we could quibble about whether those are "devices".

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like