|
|
|
|
|
by kevinkyyro
4268 days ago
|
|
It seems practical to say a functional language has first-class functions and a purely functional language has first-class functions and no mutable state -- purely functional -> functional and not imperative. I would identify a language as distinctly imperative if it has mutable state and has statements, e.g. operations with side-effects that have no return values (ex: loops, if's, void methods) -- not to be confused with expressions, which may have side effects, but always have return values. So, if you look at the matrix of possibilities based on these classifications, a language can be any combination of (OO or not OO) and (functional and/or imperative). It is trickier yet when many languages support multiple paradigms but encourage a subset. Or if you choose to restrict functional to require anonymous functions _without_ syntactic sugar. Does that help though? |
|