| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Declarative constraints in practical terms
"x" <x_at_not-exists.org> wrote in message news:dtv3n7$oi8$1_at_emma.aioe.org...
> There are people that say this:
> max([M],M).
> max([H|T],M):-max(T,M),H<M.
> max([H|T],H):-max(T,N), H>=N.
> is more declarative than this:
> max([],M,M).
> max([H|T],M,R):-H<M, max(T,M,R).
> max([H|T],M,R):-H>=M, max(T,H,R).
We can also say the above statements are imperative statements because they
state requirements :-)
By this logic we could say that the languages who are not imperative are the
ones with optional statements. :-)
In other words one can delete all the statements and the program still do
what it was supposed to do. :-)
Received on Mon Feb 27 2006 - 09:09:34 CST
![]() |
![]() |