4 ms·
FWIW, the linked book, "Concepts, Techniques, and Models of Computer Programming"(CTM), is imo a fantastic book, and there are free classes on edX ("Paradigms o
by riffraff 7y ago
FWIW, 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.
- mesaframe 7y agoI gave it a skim and from that what I could conclude was that it focuses a lot on concurrent operations. Which I don't think comes to everyone's use.
- naasking 7y agoIntegrating concurrency with mutability is a tough problem, and concurrency is becoming increasingly important.
- mesaframe 7y agoIt has always been important but again not for everyone. I would like a similar treatise but for synchronous single threaded operations.
- spinningslate 7y ago> it focuses a lot on concurrent operations It does but not to the exclusion of other computation models. I'd agree with GP - I found it a wonderful book. It builds different models of computation successively by incrementally adding features. It's a bit like SICP[0] in that it starts with declarative/functional fundamentals and brings in mutable state really late. The coverage of dataflow was the first one that gave me an "aha!" moment. It's easily 10 years since I bought it and I still dip into it every few months or so. Every time I do, I get something new: insights, deeper understanding, etc. Really wonderful book. [0] https://sicpebook.wordpress.com/ https://sicpebook.wordpress.com/
- riffraff 7y agoYes, I think concurrency is about 1/3 of the book, but it's approached the same way as the other paradigms; you have a basic language, add a single feature and see what happens: what new things can you do? How does the expressivity change? What problems arise? Is this equivalent to another paradigm? I found the insights interesting, but I would agree they are not of immediate utility to many people's day job.
- chubot 7y agoAs 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 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.
- snovv_crash 7y agoI worked with LabView enough to have an opinion, I think. 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.
- dkersten 7y ago> Labview is very effective in its niche, factory monitoring and automation, but I found beyond that it was a pain and a half. I’ve never used Labview but it’s worth pointing out that it’s only one possible implementation, just like we have many different takes on other paradigms. I’ve heard people say that labviews specific design is somewhat flawed, but I can’t comment on that since I’ve not used it myself.
- dkersten 7y agoWhat I found quite interesting, when I read CTM a few years back, was that they only introduced mutable state about half way through. That you could talk about all of these different aspects of programming before introducing mutable state was pretty enlightening.