Use of Prolog for developing a new programming language (1992) [pdf]
pdfs.semanticscholar.org
pdfs.semanticscholar.org
Prolog is surprisingly (or not surprisingly, given the Curry-Howard isomorphism) useful for implementation of programming languages, especially typecheckers.
> JA: In the first incarnation of Erlang, it was just... little black boxes were communicating, copying their messages - it's a mailbox model, copying to a mailbox. What we were doing was relational. We had Prolog processes inside the black boxes.
> SPJ: But you saw the light.
> JA: We had to. You are launching a rocket program, because... We wanted from a black box perspective, if you send a certain sequence of messages in, you want the same sequence of messages to come out. You want that to be reproducible and deterministic and Prolog isn't like that. It backtracks, and it has things like that. It just sort of became more natural to make it functional. We never made a decision about having types or not having types. That wasn't an issue. We started with Prolog. Prolog didn't have types, so we got the dynamic type system that Prolog had. The issues we were interested in were limiting errors, propagation of errors, restarting things, restarting bits of the system without taking down all the system, having things which may appear inconsistent while you are upgrading them, continuously evolving systems, not systems you stop and restart.
My take from it is they didn't want backtracking because having backtracking would allow nondeterminism (as in [2]) and they didn't want that.
[1] https://gist.github.com/olifante/222879/c7b51c7f2d17d5d5b7b6...
[2] https://en.wikipedia.org/wiki/Nondeterministic_programming
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.
"This version of Erlang was embedded in Prolog using Prolog infix operators and did not yet have its own syntax."
"Since Erlang started as an extension to Prolog it seemed reasonable that [...]"
"Erlang now had its own syntax (up to now it could be regarded as a dialect of Prolog) and could be regarded as a language in its own right, rather than as a dialect of Prolog."
I have not tried it yet. I have an idea that I know will work fine on Prolog, but, I want to put it on the web with elixir/phoenix. So I was thinking erlog might be a way to avoid message passing out to a separate prolog process.