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

I always enjoy reading positive pieces about Prolog but without touching on the implications of the principles on display, this article may do more harm than good.

You would ask reasonable questions like, "for God's sake, why?". It feels like you wouldn't use Prolog for anything besides an intellectual game.

Regarding the why:

Some of those reasons include Definite Clause Grammars, Meta-Interpreters, 1st class constraint logic programming, reified conditionals, and term/goal expansion.

There are a lot of exciting modern advances with Prolog, especially Scryer Prolog.

Check out Power of Prolog and get your mind blown: https://youtube.com/@thepowerofprolog




one example that changed my view of prolog was http://faculty.cooper.edu/smyth/cs225/ch7/prolog.htm (a toy compiler in prolog)


And this is nothing new. People already knew how to write compilers in Prolog (easily) in the 90s. The problem with Prolog is that it requires a change in the way you think about problems, to a more declarative way. Programmers are in general not willing to do this since the result will be not as performant as what they can do with C. There must be a revolution in programming education and tools before people fully understand how Prolog works.


"since the result will be not as performant as what they can do with C" -- This isn't the main reason, but it's also not really true. Paradigm changes don't imply "less performance". To the extent programmers believe, herd-like, "C is fast therefore my program will be fast", they are almost always wrong.

A lot of programmers resist learning anything new, for various reasons, but most charitably because they are never exposed to new ideas or paradigms.


yeah yeah i got that too after a while, which is also why i like non mainstream programming languages, after a while you're tired writing more versions of the same routines/procedures/methods that won't help you find better solutions


Something doesn't have to be new to be valuable (XKCD "Ten Thousand" et al). A revolution starts with inspiration.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: