3 ms·
> I always thought you had imperative, functional, and declarative That's not how I see it (but of course this largely depends on your definitions). The main
by cygx 12y ago
> I always thought you had imperative, functional, and declarative
That's not how I see it (but of course this largely depends on your definitions).
The main paradigms are imperative and declarative (think Assembler vs. Prolog if you want to go to the extremes).
'Functional' describes the language at a different level, as does 'object-oriented'.
If you go down to the core ideas, being functional is a declarative concept (mathematical functions are relations between sets), and object-oriented an imperative concept (objects are an abstraction over mutable state).
However, that's not necessarily how these concepts appear in practice (a function call is an instruction to trigger a compuation, the set of messages understood by an object declares its interface), and almost all programming languages are multi-paradigm anyway.