Lists Home |
Date Index |
> But back to the issue of the advantages of a declarative approach:
> They seem to be, in theory anyway, from what I learned re-reading the
> old thread:
I think you forgot the most important advantage of declarativity:
- logical/physical independence. Declarative languages (or high-level
languages, since "declarativity" is a hard to define word) describe
"what" has to be done, not "how" things have to be done. Hence, a
program/application can be isolated from changes and evolutions of the
environment (physical data evolution, changes in the underlying software
layers, changes in the underlying hardware and software
architecture, changes of the protocols, etc). When adding an index the
SQL queries don't
need to be changed. Sometimes only recompilation has to be done to adapt
the declarative programs to the new changes, sometimes not even that.
Declarative programs are robust to the evolution of the environment in
I think that's their main advantage (at least in theory).
Of course there is no such thing as a perfectly declarative language
in the same time!) Is SQL purely declarative? Of course not. Is XQuery
declarative ? Nope. But they are getting closer and closer ....