I've seen a lot of people confusing Java for Javascript and saying bad things about Ruby without any real context, so I'm making this topic to clear things out, hopefully will be marked as sticky.
When I was younger, I thought Java was a shortened word for Javascript, it's not!
They are completely different languages, like Java is Spanish and Javascript is English.
Ruby wasn't a bad language by itself, but Javascript is much more widely used,
infact, Javascript is the only programming language natively available to
browsers, so as you can imagine, not only is used everywhere (phones, computers,
tablets, etc.), but it's also well known. So the main advantage of this language
over Ruby, it's definitely that much more people use it.
In addition, the Ruby implementation that was used in Rpg Maker was very old and
missed Rubygems, which is probably one of the main reason why one would use Ruby.
Anyway, let's compare the syntax of the three languages!
JavaScript
(note for experienced developers: I'm not going to dig into not using new or using ES6 classes)
Ruby
Java
As you can see, there are huge differences between Javascript (which is written as one word) and Java, they are used in widely different context and the syntax is completely different.
When I was younger, I thought Java was a shortened word for Javascript, it's not!
They are completely different languages, like Java is Spanish and Javascript is English.
Ruby wasn't a bad language by itself, but Javascript is much more widely used,
infact, Javascript is the only programming language natively available to
browsers, so as you can imagine, not only is used everywhere (phones, computers,
tablets, etc.), but it's also well known. So the main advantage of this language
over Ruby, it's definitely that much more people use it.
In addition, the Ruby implementation that was used in Rpg Maker was very old and
missed Rubygems, which is probably one of the main reason why one would use Ruby.
Anyway, let's compare the syntax of the three languages!
JavaScript
(note for experienced developers: I'm not going to dig into not using new or using ES6 classes)
Code:
function Person() {}Person.prototype.doSomething = function() { console.log("Hello World");};myPerson = new Person();myPerson.doSomething();
Code:
class Person def dosomething puts "Hello World" endendmyperson = Person.newmyperson.dosomething
Code:
public class Person { public void doSomething() { System.out.println("Hello World"); }}// The following lines are required in Java because the main entry point must// be expressed in this waypublic class Main { public static void main(String[] args) { Person myPerson = new Person(); myPerson.doSomething(); }}