What makes Python a multiparadigma programming language?

Asked

Viewed 2,673 times

18

Here on this Wikipedia page cites some examples of multi-language such as C++, Groovy, Oz, Ruby, Scala, Swift, Groovy and even Python. Particularly I did not find so objective the explanation.

What makes Python a multiparadigma programming language?

1 answer

19


It allows using various paradigms :P

Knowing that the paradigm is just a fancy name for the style, you can program in more than one style. If you are not absolutely sure what a paradigm is and which are the main ones, be sure to read the latter link.

Like all language mainstream, Python has the basic style of imperative programming, which are the majority of commands, which control the flow, variable assignment, etc.

She has an influence from functional paradigm, allowing recursion, use of lambda, understandings of data collections, etc. It’s a bit of an exaggeration to say that Python is a functional language, but by marketing you end up using, all languages do. In fact you can adopt a little style, but only a little, a little.

In addition it allows some secondary paradigms. To object orientation is the clearest of them. As it allows the use of classes with encapsulation, inheritance and polymorphism, it conforms to OOP (paradigm that is far from having the importance that many believe it has, and that is not opinion). But the organization of the code can follow the procedural paradigm also, where only simple functions are used.

Like most dynamic languages (which some even consider paradigm) it has reflective ability (information on the structure of their data and codes).

A multi-paradigm language tends to please more people and meets more needs. And indeed has a background of truth that Python adopts some extra styles beyond the imperative that is its strong.

Don’t rely on Wikipedia comparative table, There’s a lot wrong there. It seems that it was made by someone who even understands what the paradigms are (actually made by several people each with a background different, must have given much fight, was something created in committee that has no consensus).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.