Classification of the Principal Programming Paradigms (2009)
11–20 of 34 posts
Re: Classification of the Principal Programming Paradigms (2009)
#12I.e. Imperative: Procedural, Object-oriented
Declarative: Functional, Logic (or better term for Prolog-esque languages - constraint-based perhaps)
Four simple categories with two meta categories.
Re: Classification of the Principal Programming Paradigms (2009)
#13Two small discussions at the time: https://news.ycombinator.com/item?id=733041
https://news.ycombinator.com/item?id=578632
(These links are just for the curious; reposts are fine after a year or so.)
Re: Classification of the Principal Programming Paradigms (2009)
#14FWIW, the linked book, "Concepts, Techniques, and Models of Computer Programming"(CTM), is imo a fantastic book, and there are free classes on edX ("Paradigms of Computer Programming", I think it's now split in two now) that go over the material. Highly recommended if you have an interest in this stuff.
I've read about this paradigm in the literature, e.g. with the Lucid language and others. And the book goes into some depth about it.
But somehow this paradigm hasn't caught on, despite the constant production of new experimental languages. And I've never seen a real program in it -- e.g. one over 5K lines that people use.
Anyone have a conjecture on what happened? Is it flawed, or did nobody pay enough attention? I think there is some overlap with async/await which seems to be the dominant concurrency paradigm now (C#, JS, Python, Rust, etc.)
I think one issue is that real systems are composed of multiple languages, and it's hard to bridge programs with wildly different evaluation semantics with C or JavaScript code.
And I guess the paradigm is not "reactive". It wants to control the main loop, but in GUIs and networking code where async/await is appropriate, the app doesn't "own" the thread of control. A new paradigm for batch programs is perhaps of limited use.
I guess I sort of answered my own question -- the model doesn't solve enough problems to justify its cost. (Also, another issue is that it's a model of very fine-grained parallelism, where as coarse-grained parallelism with limited communication is faster. That's how people optimize in practice.)
I'm interested in any contrary opinions though.
Re: Classification of the Principal Programming Paradigms (2009)
#15Re: Classification of the Principal Programming Paradigms (2009)
#16Correct me if I'm wrong, but this seems to be missing array programming (APL, Matlab, Julia, etc).
Re: Classification of the Principal Programming Paradigms (2009)
#17Correct me if I'm wrong, but this seems to be missing array programming (APL, Matlab, Julia, etc).
What about array programming, in your view, would differentiate it from the imperative and related paradigms?
Re: Classification of the Principal Programming Paradigms (2009)
#18Beautiful. But where is JavaScript? Is multi-paradigmatic, tho
Re: Classification of the Principal Programming Paradigms (2009)
#19FWIW, the linked book, "Concepts, Techniques, and Models of Computer Programming"(CTM), is imo a fantastic book, and there are free classes on edX ("Paradigms of Computer Programming", I think it's now split in two now) that go over the material. Highly recommended if you have an interest in this stuff.
As far as I remember one of the main ideas was "dataflow variables", which are lazily evaluated in parallel (?) I've read about this paradigm in the literature, e.g. with the Lucid language and others. And the book goes into some depth about it. But somehow this paradigm hasn't caught on, despite the constant production of new experimental languages. And I've never seen a real program in it -- e.g. one over 5K lines…
The issue is that it isn't actually any easier or faster. The machine still needs to do the same synchronizations and cache invalidations. The engineer becomes very limited in what they can effectively do (recursive structures? They become like {} in Go, performance nightmares).
Labview is very effective in its niche, factory monitoring and automation, but I found beyond that it was a pain and a half.