The Student Room Group

Logic Programming/Declarative Programming paradigm

Ok for OO programming language, its paradigm its like we think in Objects, or my lecturer likes to say it, think OO. When we think in OO, we think what kind of objects that interact with other objects that are in the domain that we want to solve. With this we also need to know can the object inherit any characteristics that other earlier ( related) objects have been define (using inheritance). Also objects can also take many form (like Employee can be Engineers so Employee newEmployee = new Engineer(); ). So all of this combine to become a way of we solve our programming problem or we can call it programming paradigm (OO paradigm to be specific).

ok fine...


but how about Logic Programming? What way of thinking we need to use in order to solve programming problem. i know some of you would just say ( OMG...just think Logic !!). Yeah i know but in what way? what are the characteristic of a Logic programming paradigm. Hope someone can help clarify it. it will help alot.


also Declarative programming and Logic Programming is the same right?
Reply 1
I think there is a difference between declarative and logical programming, but only a small one, and I can't really say I know what it is.

I wish I had an answer for your main question, it's something I'd like to get my head around a bit better.
Reply 2
Psyk


I wish I had an answer for your main question, it's something I'd like to get my head around a bit better.


hope u ( or someone ) can answer it than if know
Declarative programming: you specify the properties of the solution, and let the inbuilt backtracking algorithms and whatnot solve it. You're concerned with the end-state of the world, not how you get there.

Logic programming is a type of declarative programming. It simply involves creating logical statements (normally implications) couched in certain forms which allow backward-looking algorithms to start at the end-state and find a path back to the initial state.

That's my understanding anyway.

Latest

Trending

Trending