Hacker News new | ask | show | jobs
by flavio81 3125 days ago
>Since doing a whole program in prolog isn't really practical for me, is there any way to use the logic programming paradigm in mainstream programming languages to deal with specific problems that fit it?

Yes, for example is easy to embed Prolog code in Common Lisp by using a suitable library. For example the LispWorks implementation includes a full Prolog package. Example:

https://news.ycombinator.com/item?id=12251046

With this, you can use the logic paradigm within the same project, along with the other paradigms supported by Common Lisp: Procedural, functional, meta, imperative, dsl-based and OOP.

Racket should also allow very easy mixing of Prolog source with the rest of the project, since Racket was designed to support different languages at once.