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

Are there any modern logic programming languages? I've tried looking for them before, but found nothing.


I can't say I've tried it myself, but Mercury looks interesting:

http://en.wikipedia.org/wiki/Mercury_%28programming_language...

http://www.mercurylang.org/


No and yes. I don't know of a "modern" logic programming language that is a standalone language (they might exist but are not too popular), but there are several embeddable logic programming languages. Clojure's core.logic is perhaps the most popular one, but there are others too. And Prolog itself can be embedded in several different languages.

And this makes all the sense in the world, Prolog isn't a very practical programming language for tasks that are not logic programming (or some variant thereof - like fuzzy logic). So it's nicer to have a logic programming language either as an embedded domain specific language (EDSL) or available as a library.

Implementing a Prolog -like language isn't too difficult (and it's very fun) so sometimes it might be more practical (or fun) to whip up a custom language for that purpose, perhaps with domain specific variations applied.

And besides, Prolog is "modern" in the sense that there are actively maintained and used implementations available. Like Lisp, it has stood up well to the test of time (perhaps because Lambda calculus and Predicate logic are solid theoretical foundations to build on), and there are modern implementations available even if the language itself is decades old.


Mozart/Oz perhaps? Multiparadigm, true, but includes logic programming according to my knowledge.


For constraint logic programming, ECLiPSe: http://eclipseclp.org/ It extends Prolog in various ways and was open sourced by Cisco a few years back.


Now that Shen is BSD it is great opportunity to work with a mix of Prolog and a LISP (and much more).

http://www.shenlanguage.org


There's minikanren which is a library that's implemented in many different languages.

Have a look at Clojure's core.logic for an example.


Parts of the "logic" component has been relegated to libraries -- rule based system, constraint programming, databases (see Datomic and its Datalog based querying languages).




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: