Now suppose that the problem is not so straight forward as in finding the square root. Declarative programming in the general case would allow one to specify to a robot that it should walk to a certain location and arrive at a certain time. It knows (or can figure out) how to avoid crashing into things and also about not breaking laws and such. It can decide what time to leave the starting point but you don't have to tell it all the steps that will be involved. It is really about constraint satisfaction. Your program might look like this: "meetAt(workPlace , 5:00AM)". It is a well defined problem that clearly has right and wrong outcomes but the constraints are given, not a specific algorithm for the solution. Prolog is one example of a language that automatically solves declarative constraints but the syntax is bad.