Darwin's Theories Blog

New Theories for a New Time

Java vs Javascript

2022-11-01
They're not one and the same!

It’s common for non-technical people to assume that Java and JavaScript are alike, but it’s rather more like Tom and Tomato, or Pot and Potato. Or as one (Java-leaning) wag based in the USA said, JavaScript is to Java as George Burns is to George Washington :-)

To be more precise:

  • Java is a strongly-typed, compiled computer language.

  • JavaScript is a non-type-safe, interpreted computer language.

They share a lot of syntax, a dozen or so "reserved words", and 4 letters of their name, but they are not interchangeable. If you ordered a tom cat and got a tomato, you’d probably be upset (especially if the tomato had gone furry, ewww). That said, there may be some developers that can say they are comfortable in both, but I am not one of them.

The only reason the names are similar is that, way back in 1995, Sun Microsystems (the mid-sized computer company where Java was invented, and which was later swallowed up by Oracle) wanted a public platform for their new language, so as a licensing term they (probably unwisely, in hindsight) allowed Netscape to change the name of their scripting language from LiveScript to JavaScript, in return for getting Java shipped pre-installed in the Netscape browser. The rest, including all the confusion that engendered, is as they say, history.