Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So then, why learn prolog?


Prolog is kinda the natural step after FP. Now variables are not one point in space but the whole space itself. Combinatorial bliss. The syntax is kinda shorter..

Whether it's prolog, Kanren, datalog or any other relational language I wish everybody to enjoy the mind expanding effect.

ps: for any scheme ready, 'the reasoned schemer' is a good book about the pieces for relprog


For me the greatest benefit of learning Prolog was really understanding recursion – the only way to iterate through something is with a tail-recursive call. Also, it really makes you appreciate the For loop ;)

Another cool aspect of Prolog is how simple it is to write a meta interpreter. Fort example, you can easily change Prolog's default depth first search through the solution space to breadth first, or iterative deepening: https://www.metalevel.at/acomip/


Well, in order to satisfactorily answer that, we'd have to agree on what constitutes a good reason...

(describes a notation for propositional logic)

Oh. I see what you did there.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: