3 ms·
The thing is from my experience, most computational individuals would be strongly opposed to FP. They may not have been raised on for loops, but once they learn
by noobermin 12y ago
The thing is from my experience, most computational individuals would be strongly opposed to FP. They may not have been raised on for loops, but once they learn about for, good luck on having them warm up to the idea of map and reduce.
I think the only way you'd succeed is by snatching their young before they go down that path. I don't really see many people warming up to new things aimed at them like Julia or even not-so-new stuff like numpy/matplotlib and friends. If it isn't Fortran or C or matlab, it doesn't ring well with them. Of course, the new kids who don't know programming (or physics yet, perhaps) are ripe for indoctrination of your religion as opposed to theirs.
- jeffreyrogers 12y agoI'm not sure this is a bad thing. The criticism of C and its counterparts is valid in some respects, but I think the dogmatic views of FP proponents overstep the bounds of what is justified in many situations. Often a more procedural solution maps better to the problem at hand than a recursive or functional one would. Just to clarify: I'm not anti-FP in any way. I've implemented some fairly large projects in OCaml and like the language a lot, however, I don't think FP supersedes more traditional programming styles in all (or even many) cases. I expect some people to disagree with me and I'd love to hear why! I put my viewpoints forward not to say that they're the absolute truth but more to get responses from other people. I'd be more than happy to chance my opinions if given compelling evidence.
- ky3 12y agomost computational individuals would be strongly opposed to FP There's ample evidence for and against. The most famous counterpoint I know of is Dijkstra, whose Ph.D. was in theoretical physics. What does a theoretical physicist do? They calculate, of course. On reams and reams of paper. Dijkstra famously warned against the brain damage that comes with learning BASIC. I understand it to mean that one could be so caught up with the details of shuffling bits and bytes that a bigger picture is no longer conceivable to the poor fellow. Because the poor fellow has fallen into the trap of premature optimization. For loop all the things, higher abstractions be damned.
- mcguire 12y agoA couple of random bits of trivia: * Dijkstra's Ph.D. was in theoretical physics, but I don't believe he ever actually did much. Instead, he was working on computing systems. Famously, when he was getting married, the Amsterdam official recording the marriage wouldn't accept "programmer" as a job, so his marriage certificate says "theoretical physicist." * Dijkstra was not a wildly big fan of functional programming. Admittedly, he was less a fan of other things, and I've had this sneaking suspicion that his was simply another allergic reaction to recursion, but still...his guarded command notation was essentially imperative.
- agumonkey 12y agoA great deal of Mathematics were done in tables, vectors and matrix, that mapped (probably because of a feedback loop) so well the imperative indexed loop that it's not surprising they'll love it. On the other hand, watching Gilbert Strang videos, I had the feeling that his views on maths were very FP-ish. Splitting matrices into sub-matrices, combining them with higher order operations. No i,j,k index ever to be seen.
- lrc 12y agoI love FP, but in order to learn to love it you have to get used to the idea that the language is going to be doing a few things that you might not like (collecting garbage, silently boxing things, not knowing how to convince the system to use the vector operations provided in hardware). With Fortran/C, it's easy to see how assembly language gets produced. I like Haskell a lot, but while I know how C(++) gets to the iron I'm pretty vague on how Haskell does it. FP can still win, or approach parity, but it costs some trust