DEV Community

Discussion on: Why all this hate about Python?

Collapse
 
appeltel profile image
Eric Appelt

Ok, here we go (puts on fire-resistant coveralls) ...

For reasons that no one understands, all of the sudden python acquired this
enormous library structure which allowed people to say "I'll make a thing
that does this, that or the other thing" and they found all the stuff that
they wanted, in particular they could make a robot move around.

  • Gerald Jay Sussman, co-author of the MIT SICP course, at an NYC LISP Meetup

Python is an extraordinarily successful language, especially for one created as a hobby project named after sketch-comedy with a design philosophy that is a nineteen line poem.

Python got the holy grail (pun intended) early on - a big set of reusable and well-maintained libraries that you can just grab off the shelf and save yourself thousands of lines of code reinventing the wheel. Its better than a great static type system, better than automated testing, better than object-oriented, functional, or any paradigm one can imagine. With a few great libraries that you can actually use, your massive complex project might just reduce to a 50 line script.

I don't claim to know why python is so enormously successful. I really like python, and I could speculate on some of the properties of modules as a basic unit of encapsulation, iteration and other basic protocols, and so on. But at the end of the day I don't fully understand why, and neither does Gerald Sussman.

This lack of understanding is frustrating to the idea of software engineering. I think that much of the field would like to believe that we can enumerate - at least in part - what properties a language should have in order to result in rapidly developed software which is reusable and maintainable by teams of human beings. Python is missing one of the big ideas here, which is a strong static type system. If that is so important, then how is python so successful? How are teams writing python not drowning in uncaught type errors? How are there so many good libraries available?

There are two major differences between software engineering and traditional engineering fields:

First, software engineering is generally not a regulated profession - at all. There are no standard proficiency tests, degree requirements, or even a truly agreed upon curriculum.

Second, there is no basic theory or set of equations to tell you if a given design will result in a software that is successful in the sense that it can be delivered on time and maintained with a reasonable level of effort by a team of humans. Electrical engineers can use Maxwell's Equations and derived formulas to state clearly and definitively if a given design will generally work. Civil engineers have Newtonian Mechanics. Aerospace Engineers can rely on various approximations of the Navier-Stokes Equation. I would argue that software engineering does not have, and may not ever have, some sort of equivalent set of laws to tell you how successful a project will really be. It's fundamentally a harder problem as it involves human behavior.

So python, with its arguably haphazard success, serves as a reminder of the inherent difficulty in determining a working and general theory of what properties are required to make a software development project a success.

TLDR - python lacks many language features considered by many to result in successful software projects, static typing being a major example. While this may make the language unsuitable for some teams of humans, a great many teams of humans have found success using the language and built a huge ecosystem of usable libraries. There is no commonly agreed upon theory of why this has happened. That's kinda frustrating.

Collapse
 
jamesbecker profile image
James Becker

Teams of humans, as opposed to... teams of ducks?

Collapse
 
ronbarakbackal profile image
RonBarakBackal

Really liked your comment ! I actually have one thing that deeply troubles me with python, from my stubborn must-do-anything(like must prove this theorem kind-of-stuff...) : well, trying to do something really scientific in python without Numpy is slow, and it just seems so nice to actually WRITE those things and see they work then just say: Hi, give me that! But not everyone is into this all I-want-to-prove that the fundamental theorem of calculus actually is real thing :-) . Interested how do you think I'll be able to reconcile with python? maybe try to write python like Rust?(even possible)