What is the programming paradigm used by JavaScript?

18

What is the programming paradigm used by JavaScript or is it like Python that uses multiple paradigms?

    
asked by anonymous 05.05.2016 / 01:09

1 answer

25

Today any mainstream language (which everyone knows and uses, which has popularity) uses various paradigms .

The main of all of them (just the mainstream ) is imperative , JS is no different, and can even be used in the procedural form (obviously in a structured ).

JavaScript is also known to be object-oriented through prototypes .

But like any modern language, it drinks in the functional paradigm more and more.

We can not help but notice a strong influence on event-oriented programming .

Object orientation recently can be expressed through classes also, albeit only syntactically. Even so, the usage is a bit different from what we find in the well-known languages that say OOP (C ++, C #, Java, etc.), even because dynamic typing forces differences. Anyway, the OO style is adopted a bit, but it's far from pure OO, as is Smalltalk.

The language uses dynamic typing (for now) and is used as script . It is said as weak typing , but this does not happen in all situations, having primitive types (as opposed to the comments below) and dictionaries to populate the prototypes and simulate the classes (natively in the language). Usually runs as interpreted, but background is compiled .

The language was strongly influenced by Self which is a purely object-oriented language. And Scheme that is pragmatically functional. In addition to the various imperative languages existing.

Understand What is a paradigm? .

    
05.05.2016 / 01:25