4 ms·
Your definition of "functional programming" is unusual. Wikipedia defines it as: "A programming paradigm that treats computation as the evaluation of mathemati
by weavejester 17y ago
Your definition of "functional programming" is unusual. Wikipedia defines it as:
"A programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data"
Wikipedia goes on to consider Erlang and Scheme functional programming languages, so it would seem your definition of what consists a functional programming language is more narrow than the norm. Most people would consider Clojure to be a functional programming language, just not a pure functional programming language.
I'm also not sure why you describe a language with macros as being "Inflexible". I've used Clojure and Haskell extensively, and Clojure wins on flexibility. It's a dynamically-typed Lisp, after all.
- jrockway 17y agoI think I am agreeing with Wikipedia's definition. What function is evaluated that makes "foo" execute before "bar" in "(foo) (bar)"? Wikipedia goes on to consider Erlang and Scheme functional programming languages Yeah, people have diluted the term to near meaninglessness.
- weavejester 17y agoGenerally, in Clojure you'd write (do (foo) (bar)). The do form tells Clojure to evaluate its arguments in order. Some forms have an implicit do, e.g. (when x y z) is (if x (do x y)), but in general the order in which forms are evaluated depends on the form containing them.