
Use of Prolog for developing a new programming language (1992) [pdf] - tosh
https://pdfs.semanticscholar.org/57d3/1ca47fa9688089b9b7e7c19c199aa03aff1e.pdf
======
pcwalton
Fun fact: Niko Matsakis is working on a rewrite of Rust's typechecking/trait
matching infrastructure in Chalk, which is a derivative of Prolog:
[https://github.com/rust-lang/chalk](https://github.com/rust-lang/chalk)

Prolog is surprisingly (or not surprisingly, given the Curry-Howard
isomorphism) useful for implementation of programming languages, especially
typecheckers.

------
whitten
Story of development of Erlang from 1992. I don't know why Erlang does not
include backtracking. It seems a required part of Prolog. Can anyone explain
the advantage? I read this PDF to see if they answer the question but found no
mention of it, as if Prolog doesn't support backtracking at all. Does this
make sense to anyone?

~~~
lostcolony
Because Erlang was not written to be a logic programming language? I may
misunderstand your question, but it strikes me as akin to asking why Python
doesn't support pointers (since it was initially implemented in C).

~~~
whitten
What Is it about being a logic programming language that means that
backtracking is not a part of it? I see backtracking as an implementation of
search, where Prolog takes expressions and finds bindings for those
expressions where the expressions are true. Doesn't Erlang look for solutions
to its rules?

~~~
lostcolony
I see search as a particular kind of problem that would be defined in a
library, not a language. Unless it's a language built specifically to solve
constraints (i.e., a logic programming language), which Erlang is not.

Can you point out where within Erlang you feel backtracking should be
supported by the core library? It sounds to me like you want the language to
be something it fundamentally isn't; i.e., more Prolog-like, and I'm uncertain
as to why.

~~~
Avshalom
I think they may be confounding pattern matching with unification.

