9,428 karma · joined Jul 10, 2015 (11y ago) · 3,276 submissions
comment 9y ago · link · parent
comment 9y ago · link · parent
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.
comment 9y ago · link · parent
For example, in the case of "name" there are typically many different things that need a "name" in the same context. First name, last name, etc. "name" by itself (and other short names) is honestly asking for lots of headaches in the long run.
comment 9y ago · link · parent
You can choose to do this in any language, but that does not make any language conducive to FP. The other main ingredient is that a function should be a primitive data type in the language, and can be stored, re-assigned at run-time, passed to other functions, and returned from functions. Without this, you definitely cannot have a functional language.
comment 9y ago · link · parent
I have learned over many years that longer, highly readable and descriptive names make life extremely easier in the long run, at the expense of a few extra characters to type.
comment 9y ago · link · parent
That's the first time I've heard anything like this. Lots of great FP languages exist that are not dynamic or offer such macros, why would they be a requirement for FP?
comment 9y ago · link · parent
comment 9y ago · link · parent
comment 9y ago · link · parent
I'm kinda amazed by this!
comment 9y ago · link · parent
I wrote full-time Clojure for two years, and did all of last year's Advent of Code in Clojure. In my entire life, I have never once written a line of Java and I have no idea the details of its standard library. That's how well-encapsulated Clojure is.