3 ms·
Right! I didn't know that it would have to be a primitive in the language, and would have thought that functional programming was more of a methodology than a t
by fnordsensei 10y ago
Right! I didn't know that it would have to be a primitive in the language, and would have thought that functional programming was more of a methodology than a technology.
Wikipedia[1] seems to think that functional programming is a subset of declarative programming. It would be interesting to see a table, or possibly a decision tree, of possible language design choices to see the different parameters by which a language can vary.
[1]: https://en.wikipedia.org/wiki/Functional_programming https://en.wikipedia.org/wiki/Functional_programming
- hellofunk 10y agoFP is not a methodology alone. It requires language support. Some languages support it better than others. Some are clearly and only functional, others offer many functional features but not the whole package. Also, the degree that a language needs to support certain features to be called functional varies among developers. Some languages are very clearly not functional in any way, while others, like C++ since 2011, offer a lot of functional features but do not offer the same paradigms that languages like Clojure and Haskell offer. That's because the other "primitive" a language should support to be fully functional are persistent data structures that can be bashed on by numerous functions without performance cost. Such structures don't exist yet for C++ (though many have tried, and they might eventually), but are the core of Haskell and Clojure.