the use of "class" in JS

The hardship is explaining identation with spaces really. If students get it, then Python has nothing to be jealous vs Java or any other language really. 🙂
How else would you indent code?


Spaces makes perfect sense.


People do it outside of programming as well.
How else would you indent code?

Spaces makes perfect sense.

People do it outside of programming as well.
No argument here. To be honest I prefer using Python than Java, but not for teaching. That's another story though, I choose java, so students will understand C++ and C# easier in the future, since both are really fundamental languages today.

But you are right. I find it 100% cleaner the code with spaces, for a human to understand and it makes no difference for the machine really, so I consider Python more elegant. Not to mention that when you need a library to do something (whatever that is) then someone made it already for python. 😛

Python is just awesome and indenting is more human-like. But I think it easier to start with braces, so you can understand more languages, just by learning one, and then discover Python and appreciate it! 😉 Let's not derail the thread though. I will send in your inbox. 🙂
@hero2x - I never said master.  I said get good at it.

Unless you think good = master.

Java is used for other things then operating systems.  It's most popular usage is business applications.  It is also the most popular language used in the world currently(according to the TIOBE Index).

Also, Java and Python are the two most popular languages to be taught in college. A big reason Java is taught is that the knowledge can be used to quickly learn C based languages.  No other OOP share much in common with Javascript, so you get way less "bang for your buck" when learning it so to speak
That because you use "good" as an argument for what I have been arguing master a language would take 10 years or 10,000 hours. System language does not mean that language is solely use to write operating system. System language here means that language has capability to an extend that can be used to write an Operating System (manage hardware resources.) While JS and Php are known as scripting language because they are best use for web applications, they have limited capabilities to manage and manipulate hardware resources. 

The reason Java is popular for teaching because it was largely support by enterprises, that also means high demand for java developers. Java and its JVM have been used by billions and millions machines. Most apps developed for Android were written in Java. This does not mean it is easier to learn than Php, JS, Python, Ruby or C#
That because you use "good" as an argument for what I have been arguing master a language would take 10 years or 10,000 hours. System language does not mean that language is solely use to write operating system. System language here means that language has capability to an extend that can be used to write an Operating System (manage hardware resources.) While JS and Php are known as scripting language because they are best use for web applications, they have limited capabilities to manage and manipulate hardware resources. 

The reason Java is popular for teaching because it was largely support by enterprises, that also means high demand for java developers. Java and its JVM have been used by billions and millions machines. Most apps developed for Android were written in Java. This does not mean it is easier to learn than Php, JS, Python, Ruby or C#
JS and PHP are not known as scripting languages as much any more due to the fact that large and professional web applications are built using them and OOP based concepts. Look at Laravel Web Framework or even Ember JS as popular examples.

Java is supported by enterprises but look at Angular JS or Zend Framework ... As counter to that.

Learning Java DOES (for me at least) make it easier to learn other languages like PHP and JS, it helps you formulate problems and solve them in your mind in an object oriented approach.
JS and PHP are not known as scripting languages as much any more due to the fact that large and professional web applications are built using them and OOP based concepts. Look at Laravel Web Framework or even Ember JS as popular examples.


Java is supported by enterprises but look at Angular JS or Zend Framework ... As counter to that.


Learning Java DOES (for me at least) make it easier to learn other languages like PHP and JS, it helps you formulate problems and solve them in your mind in an object oriented approach.



JS is a scripting language though. @hero2x is right on that. JS started for that reason.


Java is NOT suggested by academics because of the industry. Who told you that? It's like assuming all teachers are sellouts. C# and C++, Python, JS, PHP, Ruby on Rails, Java,  are all encouraged by the industry. Java is, as @DarknessFalls said, a great language to start with, because you can understand the rest of the languages easier after understanding Java.


JS is actually VERY popular nowadays and it is a real trend. Classes are a good add on that will bridge the modern concept of that scripting language with more traditional (and well thought) concepts of C++, Java etc etc
Javascript might have started as a scripting language how ever it, like PHP has grown up as well as ruby (rails). 

Javascript has grown into a OO based "scripting" language that is used for single page web applications - hell you can do IOC, DI and various other patterns in JS.

Any ways back on topic, classes in JS are easy to do and suggested to in order to kept things modular, I suggest you use them 😀
JS and PHP are not known as scripting languages as much any more due to the fact that large and professional web applications are built using them and OOP based concepts. Look at Laravel Web Framework or even Ember JS as popular examples.

Java is supported by enterprises but look at Angular JS or Zend Framework ... As counter to that.

Learning Java DOES (for me at least) make it easier to learn other languages like PHP and JS, it helps you formulate problems and solve them in your mind in an object oriented approach.
Here look at definitions and why a language consider as scripting language.

A scripting language, script language or extension language is a programming language that allows some control of a single or many software application(s). Languages chosen for scripting purposes are often much higher-level than the language used by the host application...

 Scripts are often, but not always, interpreted from the source code or "semi-compiled" to bytecode which is interpreted, unlike the applications they are associated with, which are traditionally compiled to native machine code for the system on which they run

he spectrum of scripting languages ranges from very small and highly domain-specific languages to general-purpose programming languages used for scripting. Standard examples of scripting languages for specific environments include: Bash, for the Unix orUnix-like operating systems; ECMAScript (JavaScript), for web browsers; and Visual Basic for Applications, for Microsoft Office applications. Lua is a language designed and widely used as an extension language. 

https://en.wikipedia.org/wiki/Scripting_language

If you think learning Java  " it helps you formulate problems and solve them in your mind in an object oriented approach." for learning JS, you may be wrong. JS is not pure OOP it is mixture with functional programming paradigm.  Java was pure OOP and did not have functional paradigm still up to Java 8.
Javascript might have started as a scripting language how ever it, like PHP has grown up as well as ruby (rails). 

Javascript has grown into a OO based "scripting" language that is used for single page web applications - hell you can do IOC, DI and various other patterns in JS.

Any ways back on topic, classes in JS are easy to do and suggested to in order to kept things modular, I suggest you use them 😀
Oh now JS is scripting language. Ruby is not scripting language and have never been. It is system language. Ruby on Rail is framework and is not a language. PHP consider scripting language because it mostly use for web, it does not as capabilities for handling lower detail of systems.
Oh now JS is scripting language. Ruby is not scripting language and have never been. It is system language. Ruby on Rail is framework and is not a language. PHP consider scripting language because it mostly use for web, it does not as capabilities for handling lower detail of systems.

Trying....not.....to....bite....the....bait ........OM NOM 

This is also really off topic .... 

Yes at the fundamental core, Javascript is a scripting language. Its intentions and purposes were just that. Scripting functionality on to web pages to (I believe) replace Java applets. But much like any language that has had time to mature and adopt a user base, Javascript became something more. It has more object oriented mindful approaches, that is people don't approach it the way they use to, they approach it with the same level of abstraction as they do say Java or C# or even C++ or even PHP (in the context of frameworks like symfony).

So yes fundamentally its a scripting language. Logically the way you approach it can make you what they call today a script kiddie or a programmer.

Now on to ruby (Not only do I program in JS and PHP but also ruby so this is me taking the bait .... )

Ruby on Rail is framework and is not a language

Where did I say it was?

PHP consider scripting language because it mostly use for web, it does not as capabilities for handling lower detail of systems.

How does that not make it an OOP based language with all the recent advancedments?

Wait a minute:  is your core argument that anything that has lower access and details about the system (C++) a OOP language and anything thats for the web is for "scripters"???

Also please go back to the main topic of the thread which is about classes in javascript which has been answered numerous times as yes they can be implemented and used and even with ES6 they are a "true" concept.
Can we follow the suggestion above and stay on topic.  Thanks.

Original thread: https://forums.rpgmakerweb.com/threads/the-use-of-class-in-js.44823/