5 ms·
Immutability may be a buzzword, but if you stick with immutable data, that does give you functional programming. The possible exception to this is that you coul
by asdfsdgdshsdgh 7y ago
Immutability may be a buzzword, but if you stick with immutable data, that does give you functional programming. The possible exception to this is that you could have certain kinds of real-world side effects in a language which only had immutable data.
FP used to mean just "no side effects". (Barbara Liskov mentions this old understanding of FP here: https://www.youtube.com/watch?v=qAKrMdUycb8 https://www.youtube.com/watch?v=qAKrMdUycb8). That is a desideratum for the even bigger buzz-phrases "referential transparency" and "equational reasoning", which are the goals of the FP research programme and have yet to really materialize.
As a counterpoint to your claim that understanding point-free style is a fundamental part of understanding functional programming, how about this 1998 paper by Andrew Appel, "SSA is Functional Programming" http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.3282 http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.3... which locates the essence of functional programming in the fact of immutable data (equivalent to imperative Single Static Assignment code).
- crimsonalucard 7y agoYou're not wrong. By simply making data immutable and just using function application you achieve something that's not too far off from function composition. I mostly advocate point free style for educational purposes and I believe in the end it doesn't matter too much whether you use one style or the other. I talk about the isomorphism briefly here: https://news.ycombinator.com/item?id=22299297 https://news.ycombinator.com/item?id=22299297 As to why I advocate the point free style for educational purposes and why I believe immutability is just buzz that hinders true understanding of why function composition is fundamental to FP I get into that here: https://news.ycombinator.com/item?id=22292105 https://news.ycombinator.com/item?id=22292105