4 ms·
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 sup
by lostcolony 7y ago
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 7y agoWhat 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 7y agoI 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 7y agoI think they may be confounding pattern matching with unification.
- dllthomas 7y agoErlang briefly was prolog, so it's a reasonable question.
- lostcolony 7y agoErlang was built in Prolog. Hence my analogy. It was not meant to -be- Prolog, and so doesn't support many of the things Prolog does, by intention.
- dllthomas 7y agoI mean it was originally a library or embedded DSL. A little different than mere choice of implementation language.
- dllthomas 7y agoAdding a little support, from Joe Armstrong's thesis (which I've been reading): "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."
- lostcolony 7y agoWell, yes. 'Originally' being a key word here. It started that way to be something else, and then continued evolving to be something else. Hence my question of what, exactly, the OP wanted backtracking -for-.