| > If Colmerauer had his way, Prolog would be a quick and dirty programming language fit to replace javascript or C. No.
There are far too many such allusions in this post that it is difficult to dismantle them all. So I will stick to this one. Note that Prolog was born exactly in the very moment when Colmerauer understood how to encode grammars. How much is this quick and dirty? Since Robinson there was some unease about how to encode grammars as this (so far) only lead to extremely inefficient proof procedures. (Roughly, any partition of a text had to be analyzed, most of which were finally discarded) Prior to this moment of understanding in the summer of 1972, as is best illustrated by Philippe Roussel's thesis of May 1972, it was not clear which strategy to use. Quick and dirty features were rather introduced when Prolog was taken from Marseille to Edinburgh. In particular, 1mo, the quite clean error mechanism was replaced by just silent failure. `T =.. L` just failed. Thereby disregarding the observation of Battani and Meloni 1973 that built-in predicates have three possible outcomes: success, failure, and error. 2do, characters were replaced by character codes something any self respecting compiler writer would have never done. But then, all in all, DEC10 Prolog had so many improvements that helped to spread Prolog. Errors are absolutely essential to ensure the correctness of pure Prolog programs. It took some more decades to recover from these quick and dirty setbacks. There is only one single such quick and dirty issue in Prolog I and that is the omission of the occurs check which was present with a flag in Prolog 0 (the first version written in Algol-W). In particular the lame excuse of this omission was started with the Prolog I manual of 1975. It was then mindlessly reiterated time and again to DEC10's and many other systems' manuals. At least, Colmerauer developed thereafter the notion of rational trees present since Prolog II. It is only now that systems slowly recover from this offering an optional occurs check. https://en.wikipedia.org/wiki/Occurs_check#Sound_Unification |
One such recent source is this documentary (in French) about Alain Colmerauer by a lady who shares his surname (a relative, I'm guessing):
https://youtu.be/74Ig_QKndvE?t=311
I've pointed the link to just before the start of an interview with Kowalski where he says (in English) what I transfer above, that Colmerauer was more practically minded and coming from a computer science side point of view while he (Kowalski) was more theoretically minded and coming from a mathematical logic point of view, and also that this tension created an "alchemy" that would not have transpired otherwise. I watched this documentary very recently and I guess it coloured my comment above.
More generally, it's easy to find discussion of the "pure" subset of Prolog and about its purported advantages compared to the rest. I'd have to go back to those textbooks to be sure, but I think I first encountered this idea in The Art of Prolog (O'Keefe) or "The Craft of Prolog" (Sterling & Shapiro), or probably both. And I have heard Ivan Bratko's coding style in his Prolog Programming for AI described as being too imperative and not the recommended style today [2].
I guess what people mean when they talk about "purity" is the lack of side-effects, and other concessions to the everyday needs of the working programmer. I understand the occurs-check flag to be one such concession, for example [3].
So I don't think that all this is just my imagination. In my experience, there really is a divide between Prolog users that think of Prolog as a kind of mathematical notation for computers and smart at the thought of its "dirty" side-effects, and those who just want to use it as a powerful, and beautiful, tool. Like myself.
But I should try to be less sentimental in my analysis in the future. Again, thanks for reminding me to check my assumptions and try to remember where my knowledge comes from.
_____________
[1] I spent four years during my PhD at Imperial College literally down the corridor from Kowalski's office, but I never had the guts to go and talk to him and ask him about Prolog's history, that I am always very curious about. I regert that now that my PhD is ended and I'm no longer in the same building, or the same city :/
[2] Which is nonsense. Also Bratko said I'm good with Prolog, so there.
[3] What does the DEC10 Prolog manual say about the occurs check?