Is Prolog worth learning?

3 min read Original article ↗

Kenichi Sasagawa

I’ve been working on improving the compiler of my own Prolog system, N-Prolog, for quite some time.
With version 5.16, I believe it has finally reached a near-complete state. After releasing it and taking a breath, a familiar question came to mind — one that regularly appears on reddit/prolog:

“Is Prolog worth learning?”

I’ve always had my own answer to this, but I hesitated to share it, thinking my perspective might be a bit unusual. Still, even a unique opinion might be worth expressing. So here it is.

Prolog is “Executable Logic”

Someone once said that Lisp is “executable mathematics.”
If we apply that idea to Prolog, I would say:

Prolog is executable logic.

Around 1980, when I first became interested in Prolog, I remember reading an article by Hideyuki Nakashima, one of the pioneers of Prolog. He wrote something like:

“Before learning Prolog, you should study logic for about six months.”

That statement sparked my interest in logic as a young student.

A Genius from 100 Years Ago: Herbrand

I came to truly understand that Prolog is “executable logic” while studying the work of Jacques Herbrand.

About 100 years ago, at the age of just 23, Herbrand made a major leap in logic.
He aimed at something remarkable: mechanical reasoning.

For a long time, I couldn’t fully understand his ideas. Concepts like the Herbrand universe and Herbrand models felt abstract and difficult.

Recently, with the help of AI, I kept asking questions and exploring these ideas. One key difficulty in automated reasoning is handling existential quantifiers. The idea of transforming them into universal ones — Skolemization — makes things much more manageable for machines.

I implemented Skolem normal form in Prolog, with the help of AI.

And then it finally clicked:

“This is Prolog.”

Herbrand, a century ago, was already pointing toward what would later become Prolog.

Why learn Prolog?

Even today, in computer science education, students are often required to learn languages like Prolog or Lisp. Many ambitious young people question this:

“Why should I learn such an old language?”

They are not wrong.

From a purely practical perspective, Prolog is rarely used in industry.
Learning Python or JavaScript is usually more directly useful.

However, we should not forget:

Modern programming languages are built on top of logic.

Practical skills can quickly become outdated in a rapidly evolving world.
But logic and mathematics have been refined over centuries.

Studying logic with just paper and pencil can be quite difficult.
But if you can run logic — experiment with it, observe it, break it — it becomes something much more engaging.

That is what Prolog offers.

Prolog is a way to learn logic by executing it.

For me, it is an incredibly enjoyable intellectual playground.

What is the real value?

The value of learning Prolog is not about the language itself.

It is about learning a different way of thinking.

Most programming languages are procedural:

Do A, then B, then C.

Prolog is relational:

What relationships must hold for A, B, and C to be true?

This shift in perspective is profound.

A modern perspective

Today’s AI is largely statistical (LLMs, neural networks).
Prolog represents the opposite side:

  • Neural → probabilistic
  • Prolog → logical

In that sense, Prolog belongs to the world of:

explainable reasoning

And it connects naturally to the idea of neuro-symbolic AI.

Conclusion

So, is Prolog worth learning?

Yes.

But not for getting a job.
Not for mastering a trendy technology.

It is worth learning to experience what logic really is.