Know the technical differences between the two programming languages

What a mess it could be to share the same name — especially if you are a programming language. Even if you are already over 20 years old, new IT specialists periodically confuse you with your namesake. This happens all the time with Java and JavaScript despite the fact that they are not related at all! As someone on the internet said, they correlate in much the same way as a car and a carpet do.

Why do these two languages have such similar names? How do they differ from each other and what else do they have in common? This article will provide the answers to these questions.

In the Beginning, It Was Java

Sun Microsystems started to develop the future Java language in 1991. It was intended for interactive television and amateur devices. However, the language turned out to be too complicated for that kind of modern device. First, Java was called Oak after the oak tree that grew near the office of the main language’s creator James Gosling. Later, the project was renamed Green. Finally, possibly under the influence of repeated caffeine consumption, we received the name Java. Like a brand of coffee. Or an island.

Java was first released in 1995. Its motto promised us that what is once written in this language will work everywhere (“Write Once, Run Anywhere”). This means that the same code can be compiled for different platforms thanks to a virtual machine. This, as well as the familiar C-like syntax and the ability to work in browsers, led to the extremely rapid growth of Java’s popularity.

The Same Year, A Little Bit Later: Meet JavaScript!

Not all younger IT people remember Netscape Navigator. It was the very first successful Internet browser that appeared back in 1994. Actually, the birth of the browser and the development of Internet technologies led to the need for a language that could work on them.

So the same year the world saw Java 1.0, a Netscape employee named Brendan Eich wrote something special. The employer instructed Brendan to create a language that runs natively in a browser (as opposed to Java, which requires encapsulated Java programs to download) and is simple enough to attract non-professional programmers. As Java grew in popularity, Eich’s managers wanted their brainchild to “look like Java.” Eich obeyed to some extent but did not deviate from the main goal. He was writing a client-side scripting language for non-professional developers, and it doesn’t look like Java at all.

However, the Netscape team needed to advertise their new language. This is probably why the JavaScript project was originally named Mocha (that’s also coffee, by the way). Later, the name was changed to LiveScript.

Almost at the same time, the first browser war began between Netscape Navigator and Internet Explorer. The guys from Netscape needed to strengthen their browser with a new language. The Netscape team agreed with Sun Microsystems that Java would work in Netscape Navigator, and the language under the license was renamed from LiveScript to JavaScript due to marketing issues. Java was a hot thing at that moment.

#javascript #java #programming #web-development

Java vs. JavaScript: Relatives, Rivals, or Friends?
1.20 GEEK