4 ms·
While not familiar with Prolog, I understand that Erlang's pattern matching comes from that world - so Erlang? EDIT: Here's a couple references for the Erlang
by locopati 16y ago
While not familiar with Prolog, I understand that Erlang's pattern matching comes from that world - so Erlang?
EDIT:
Here's a couple references for the Erlang/Prolog connection...
http://www.erlang.org/faq/academic.html http://www.erlang.org/faq/academic.html
http://hyperpolyglot.org/logic http://hyperpolyglot.org/logic
Also I found this while looking for the reference for the Prolog/Erlang connection...
http://www.slideshare.net/adorepump/learning-erlang-from-a-prolog-dropouts-perspective-presentation http://www.slideshare.net/adorepump/learning-erlang-from-a-p...
- silentbicycle 16y agoProlog's unification is quite a bit more powerful than Erlang's pattern matching, though. You can't pass around uninstantiated variables in Erlang. Erlang also discarded backtracking (because it mixes poorly with concurrency).
- evgen 16y agoOTOH, it is possible to add some of it back in. Check out Robert Virding's erlog (http://github.com/rvirding/erlog http://github.com/rvirding/erlog) and his explanation of how you can add backtracking to erlang (http://rvirding.blogspot.com/2009/03/backtracking-in-erlang-part-1-control.html http://rvirding.blogspot.com/2009/03/backtracking-in-erlang-...)