3 ms·
Slightly off topic... How does Prolog compare to Erlang, which was written in Prolog (at least the initial implementation was).
by amorphid 11y ago
Slightly off topic... How does Prolog compare to Erlang, which was written in Prolog (at least the initial implementation was).
- Jtsummers 11y agoVery late response, and only cursory, but: Prolog and erlang are not the same, or even particularly similar. Some features (such as unification, which is what erlang uses, not assignment, with the = symbol) are present, and inspired by, prolog. But the underlying computational models aren't the same. Erlang is functional/concurrent/procedural (procedural meaning you write an explicit sequence of steps). Prolog is functional/declarative. You don't (normally) write explicit steps. Rather, you describe the solution you want to find, describe the configuration of a system (essentially propositions and axioms), and let prolog search for your solution. You can do a lot more than that with the operators (declaring order of execution, terminating early, etc.), but the underlying computational model is this search. You would not use them for the same domain. You can because they're both turing complete and thus capable of expressing the same computations. You won't because erlang excels in its concurrency model (and performance with many concurrent processes), and prolog excels in its declarative/search model. I believe there are some other languages (Oz/Mozart?) that might be suitable if you want a hybrid of erlang's concurrency and prolog's declarative model.