4 ms·
My favorite quote from the book: In Prolog programming (in contrast, perhaps, to life in general) our goal is to fail as quickly as possible.
by metafunctor 6y ago
My favorite quote from the book:
In Prolog programming (in contrast, perhaps, to life in general) our goal is to fail as quickly as possible.
- johnisgood 6y agoAnd for people who may not have known: the initial version of Erlang was implemented in Prolog, and the let-it-crash philosophy is central to Erlang.
- im_down_w_otp 6y agoWhile both of the statements you made are true, the "let-it-crash" philosophy of Erlang seem quite orthogonal to the "fail-fast" of Prolog. "Let-it-crash" had to do with the idea that a wobbling process/service is harder to design around than one that's just definitively dead and also that most non-systematic errors in running programs are "Heisenbugs" (the problem is transient) and restarting the process/service will make it go away. In Prolog the point of "fail-fast" is to determine as quickly as possible if some search branch can't possibly provide a True result, so that you don't spend unbounded time searching for every possible version of false.
- sitkack 6y agoI think these philosophies are complementary, I could easily see one being the inspiration for the other, just are there are analogs between guard expressions and pattern matching with logical predicates. Ideas are contagious.
- jlarocco 6y agoJust to add a bit to that, since not many people know this part... Joe Armstrong and S.R. Virding wrote a case study chapter for the book, "Strand: New Concepts in Parallel Programming," and it has a section explaining the history of Erlang up to 1990. The first Erlang prototype, written in Prolog, ran into performance problems with backtracking and emulated concurrency, so it was ported to a Parlog system (a parallel Prolog) written by S.R. Virding. The Parlog implementation was still too slow, so a third implementation was created that compiled Erlang into Strand88, a commercial product from Strand Software Technologies, Inc. which claimed to be the first commercial parallel logic programming language. That implementation was finally fast enough that Erlang could be used outside of the Computer Science Lab at Ericson. Presumably at some point after that it was re-written at least one more time...