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

Well, I mean... Prolog is an implementation of 1st order logic with syntax sugar. So basically, Prolog is incredible if your problem can be expressed within the framework, but less so if it can't. That's pretty much why there were extension attempts such as lambda Prolog.


you're simplifying the practicalities of prolog. there are many problems that you can express declaratively to the t. and yet many (all?) solvers aren't able to reduce it to a solution. the search isn't even successfully brute forcing - it will get stuck in some branch and switch endlessly between its leafs. and then it's up to you to figure that out and help the solver. even then prolog has its value but it fails at delivering the primary promise: you describe the problem, it finds a solution.


That's the oldest complaint in the book about Prolog: "it's not 100% declarative". OK. So use Java. Or C. You think you'll have more declarative fun writing a Zebra Puzzle solver in C, than in Prolog? Be my guest.

No, the truth is that Prolog is a unique language that is almost perfectly poised between the two extremes of beautiful but unusable formal purity and everyday programming utility. Prolog makes pragmatic choices when it has to and chooses to sacrifice declarative purity for the sake of performance and usability, because that's the only thing that makes sense considering that we have to run our programs on real computers, programmed by real programmers.

And then people complain that it's no good because you can't write a solver in a purely declarative form, even though you can't even get close to the declarative features of Prolog in most other languages; except ASP, which is so declaratively pure that it doesn't even have lists.

That's just a very poor criticism, poorly thought out and really meaningless in practice.


my criticism cuts to the chase. that's why you write such a lengthy rebuttal. cause it hurts your feelings.

> So use Java. Or C. You think you'll have more declarative fun writing a Zebra Puzzle solver in C, than in Prolog?

and that, my dear friendo, is _whataboutism_!


I'd say Prolog delivers in a (relatively wide) subset of its domain of application. For instance, I'm writing a solver for some common issues in epidemiology, at the moment. I was able to write a fully declarative (and purely relational) solution! But yes, some applications are better suited than others.




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

Search: