3 ms·
Maybe I'm missing something but I'm more than halfway through the "Why isn't functional programming the norm?" and it just seems to be a kind of haphazard recol
by hardwaregeek 7y ago
Maybe I'm missing something but I'm more than halfway through the "Why isn't functional programming the norm?" and it just seems to be a kind of haphazard recollection of programming language history. A lot of which isn't what I'd call entirely correct. Python's killer app was arguably first CGI scripts then data science. Java succeeded due to offering GC in a non scripting language, the JVM and possibly lots of marketing. PHP is having a mild renaissance with Laravel (not that I'd advocate for PHP, but people do seem to love Laravel).
There was quite a bit of time in between the invention of implementation inheritance and the whole "prefer composition to inheritance". It's quite possible OOP became popular due to implementation inheritance then realized it was dumb.
This info is still useful, but what I'd really love from a talk with that title is an analysis of functional programming languages and how they each missed the boat through either syntax, lack of tooling, or purity. And compare it to functional-ish languages like Rust, JavaScript, Swift and Kotlin. Then chart a way forward for function programming language adoption. Maybe that happens at the end of the talk.
- MaxBarraclough 7y ago> seems to be a kind of haphazard recollection of programming language history Agree. The talk is very thin on the real differences between OOP and functional languages. This old comment [0] points out that functional languages tend to make it far harder to reason about low-level details, for instance. Personally I think it's more fundamental, and isn't about any such technical limitations. People have a strong intuition for time, which is emphasised in imperative languages (including OOP), which have the semicolon operator or an implicit equivalent. The concepts at play in the fundamentals of Haskell are simply harder, and 'more mathematical', than the sequenced mutation-based statements of imperative/OOP languages. To put that more provocatively: does anyone doubt that the average Haskell programmer is smarter than the average JavaScript programmer? I'm not convinced this is just because only the curious bother to learn Haskell. [0] https://news.ycombinator.com/item?id=21281004 https://news.ycombinator.com/item?id=21281004
- kopos 7y agoA complete digress, but OOPS still shines in the domain of GUI widgets programming where there are a limited number of interfaces and a huge number of widgets (implementations) working with that interface. FP works conversely, on a limited data and a huge set of functions. Maybe in the context of now with limited gui programming, FL is more suitable?
- dnautics 7y agoFunctional ui is arguably saner, as react is slowly proving to junior programmers worldwide.