4 ms·
Let me take a crack at this. There have been three main movements or philosophies in programming. The first was the "structured programming" movement starting
by noelwelsh 11y ago
Let me take a crack at this.
There have been three main movements or philosophies in programming. The first was the "structured programming" movement starting in the late 50s, discussed in the article. This was at the time when high-level languages (for a weak definition of high-level) were first becoming usable, and most people were used to using assembler. Structured programming gave some structure (hence the name) to the control flow methods used at the time. This is where for and while loops come from. "GOTO Considered Harmful" is one of the main texts from this period, and I think we can say by the 70s structured programming had won over the mindshare of most developers.
The second is object-oriented programming, which started in the late 60s, and achieved mindshare in the mid-80s to early 90s. The most influential OO language is Smalltalk (1983).
The third is functional programming, which either started in the 50s or the 70s (depending on where you draw the line) and is in the process of winning mindshare from OO right now. It's important to note that the modern incarnation of functional programming (by which I mean static types + abstractions like monads and applicatives) is very new, in programming language terms. The main standard for Haskell is 1998, Scala was created in 2005, and key techniques such as free monads are the subject of ongoing research. It has only been viable to do production quality statically typed FP for about a decade.
Python was created in the early 90s, and looks back to Smalltalk for inspiration. Culturally Python is (obviously) in the OO camp. Culturally, most developers are in the OO camp as well. Thus their definition of "good" is OO, and Python fits this. The linked post is a sign of the change that is happening right now---more developers are discovering FP and their definition of good is switching from OO to FP. From the perspective of an FP proponent, Python is not a good language.
The key point I'm trying to make is that programming is a cultural movement. We like to pretend we're objective and scientific, but we aren't. That's ok. Neither is science (see, e.g., "The Structure of Scientific Revolutions"). I do believe, however, that we're improving over time (said as a true FP adherent, of course :-)
- wodenokoto 11y agoThank you for the very thorough explanation. I was under the impression that lisp was the mother of all functional languages, so I was surprised not to see it in your comment.
- nv-vn 11y agoInterestingly, Lisp tends to be more closely related to modern imperative or OOP languages than modern FP languages most of the time (although this is very much a matter of dialect, as Clojure and Scheme code tend to resemble FP much more than CL and Elisp code do). Lisp had some ideas influential to FP that also made their way into other types of programming (garbage collection, closures, etc.), but things which are considered a modern necessity for functional programming are not present in most dialects of Lisp (like immutability of data, at least by default, currying, etc.). In fact, most Lisp dialects don't even have first-class functions (in the sense that variables and functions are stored in totally different namespaces), which even languages like C# support. So to call Lisp 'functional' is a bit of a stretch, despite the large divides between different dialects and the multi-paradigm abilities of those languages, but that's not to say that it wasn't hugely instrumental in the onset of functional programming.
- js8 11y agoI think another way to look at it is that Lisp took untyped lambda calculus and turned it into practical programming language, although in an opinionated way that was necessary at the time for performance reasons. However, modern FP languages always start from some form of typed lambda calculus, because it has more desirable properties.
- noelwelsh 11y agonv-vn has given a good explanation. When I said "[FP] started in the 50s or the 70s (depending on where you draw the line)" I was implicitly referring to Lisp (1958) and to Scheme and ML (1970s). Although Scheme does not have a static type system it is culturally a functional programming language and has had a large influence on the field.