This is a question for people more experienced with Python, but everybody feel free to answer if you feel like you can provide something decent to the discussion.

Also feel free to explain why you feel that way and your experiences with Python and the paradigms.

  • Corbin@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 hours ago

    In terms of the standard principal programming paradigms, Python is on the right-hand side in the “Shared state” column. Note two interesting things: first, Python’s box is represented by Java and OCaml; second, the box has two labels, “Sequential object-oriented programming” and “Stateful functional programming”. Python is technically a prototype-based language like ECMAScript, but it can be seen as either object-oriented or functional depending on whether we think of prototypes as classes or closures respectively.

    Note that unlike “Imperative programming”, represented by Pascal and C, Python has closures. It does have closure quirk, also called lambda quirk, which ruins an otherwise-lexically-scoped language, but folks with lots of Python experience are used to working around closure quirk. Python functions are not procedures; they are sugar for objects with a .__call__() method.

    If this is your first time with the principal paradigms, please keep in mind the following quotes. First, from the associated book:

    More is not better or worse than less, just different.

    That is, Turing-completeness doesn’t have a canonical set of computational features. Second, from the chart PDF:

    Two languages that implement the same paradigm can nevertheless have very different “flavors” for the programmer, because they make different choices on what programming techniques and styles to facilitate.