Is declarative programming the highest goal?

I would argue that there are some relatively simple imperative programs that are not helped by being expressed in a declarative style. For example, this Prolog Fibonacci program effectively has the same structure as this python script. It is only a disadvantage to write it in Prolog, because it takes a bit of extra work to translate the recursive function into an inductive predicate.

In general, we sometimes think of a computation declaratively (what we want the result to look like), and sometimes imperatively (what we want to happen). The goal should be to make the expression of what we want as seamless as possible, and that will require a variety of language, or at the very least a multi-paradigm language.

/r/computerscience Thread