Home  >  Article  >  Backend Development  >  Is there a big difference between js and python?

Is there a big difference between js and python?

藏色散人
藏色散人Original
2019-07-03 09:31:515202browse

Is there a big difference between js and python?

Is there a big difference between js and python?

Python and Javascript are both scripting languages, so they have many common features, both require an interpreter to run, both are dynamic types, both support automatic memory management, and both can call eval(). Features common to scripting languages ​​such as executing scripts.

However, they are also very different. Javascript was originally designed as a client-side scripting language, mainly used in browsers. Its syntax mainly draws on C, while Python, due to its "elegance", " It is popular for its "clear" and "simple" design and is used in different scenarios such as education, scientific computing, and web development.

Both Python and Javascript support a variety of different programming paradigms, and they are very different in object-oriented programming.

Javascript's object-oriented approach is based on prototype. The inheritance of objects is created by prototypes (also objects). Objects created by prototype objects inherit the methods on the prototype chain.

And Python is quite standard based on class (class) inheritance, and naturally supports polymorphism (polymorphine).

Related recommendations: "Python Tutorial"

The above is the detailed content of Is there a big difference between js and python?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn