4 ms·
I had the same trouble trying to explain FP to my friend/programmer buddy. The best I could come up was FP lets you write efficient code and you can be as cleve
by senthil_rajasek 18y ago
I had the same trouble trying to explain FP to my friend/programmer buddy. The best I could come up was FP lets you write efficient code and you can be as clever as you want.
Another technology that I was stumped trying to explain to laymen was IoC (Inversion of Control) containers. I used a lot of cliches like "holy grail of programming" etc., but only someone who has used IoC containers can appreciate how easily you can build loosely cooupled components.
There must be better ways of explaining FP to laymen or may be not at all...
- gaius 18y agoMy spiel goes something like it means programming without side effects, which are changes in the state of the world caused by performing computation. Such as opening a gateway to the Hell Dimension. People generally agree then that functional programming is a good thing.
- silentbicycle 18y ago"write efficient code" / "be as clever as you want" doesn't actually tell anybody anything, though. If they know C, try to explain the idea of higher-order functions, etc. in terms of passing around function pointers, perhaps. Also, definitely something about trying to contain side effects as much as possible. Maybe relate it to the sort of problems with global variables that have bitten most people at some point? If they are sufficiently interested, I would point them to the John Hughes paper, "Why Functional Programming Matters" ( http://www.cs.chalmers.se/~rjmh/Papers/whyfp.html http://www.cs.chalmers.se/~rjmh/Papers/whyfp.html ) and Raganwald's post about it ( http://weblog.raganwald.com/2007/03/why-why-functional-programming-matters.html http://weblog.raganwald.com/2007/03/why-why-functional-progr... ). Then, OCaml or Haskell. When talking to non-programmers (i.e., most people), try to speak their language, especially if you know their interests / areas of expertise. Failing that, I usually fall back on cooking, because even if somebody doesn't have any experience making bread from scratch or what have you, it's not completely out of left field the way science and math can be. Everybody eats.
- bprater 18y agoFP is function pointers, functional programming, Frontpage, floating point, frame pointer, flower power?
- staticshock 18y agoaround here? functional programming