← Back to context

Comment by kamaal

2 hours ago

>>Prolog doesn't look like javascript or python so:

Think of this way. In Python and Javascript you write code, and to test if its correct you write unit test cases.

A prolog program is basically a bunch of test cases/unit test cases, you write it, and then tell the Prolog compiler, 'write code, that passes these test cases'.

That is, you are writing the program specification, or tests that if pass would represent solution to the problem. The job of the compiler to write the code that passes these test cases.