6 ms·
>> Yeah. That was me. A friend of mine tried to clue me in to Prolog about twenty years ago and I didn't "get it". If it helps, I remember a senior programmer
by YeGoblynQueenne 8y ago
>> Yeah. That was me. A friend of mine tried to clue me in to Prolog about twenty years ago and I didn't "get it".
If it helps, I remember a senior programmer of mine once saying that out of 35 people in his Master's class, nobody really got it.
It's the way that Prolog is taught at uni. I think, because there is so much material to cover and it's very hard to know where to start, most courses end up teaching whatever the tutors think are the most important bits. Most end up teaching it as any other language, starting from the syntax and going to examples of "how to do such-and-such in Prolog" - like, how to loop over a list etc.
That is how I learned Prolog myself and it took me, I don't know, ten years? Before I could really get about half of what was going on. I think a much better approach would be to start with the theory of logic programming- spent two or three courses covering propositional and first order logic, then Horn clauses, subsumption and resolution, then when the students have at least a general idea of what logic programming is all about, get started with Prolog- which, after all, is just one possible logic programming language. Cover what it does best, what compromises it makes and what is good and bad about it. Instill some enthusiasm in the language. It's a really brilliant piece of theory and engineering and there's very good historical reasons why it is the way it is, the good and the bad, and the ugly.
>> My strong suggestion to any programmers reading this: learn and use Prolog.
Absolutely. Even more so- learn logic, and logic programming. Its impact on the way you code and the way you think is going to be huge. Hugely positive, that is.
- carapace 8y agoI was literally hanging out with Doug Miles in a cafe in Seattle in the late 90's. I feel like an idiot in hindsight. He was so patient with me and I must have let him down. Oh well, the penny has dropped, and better late than never. I think you're right. I suspect that it would be easier (and likely advantageous) to teach predicate logic first and then introduce Prolog as a kind of straightforward calculator for it, than to teach people imperative programming and then teach them Prolog from that context. I will say that it's really weird to go from being a Python expert to a Prolog tyro, but you couldn't pay me enough to go back now. > It's a really brilliant piece of theory and engineering and there's very good historical reasons why it is the way it is, the good and the bad, and the ugly. Absolutely! Part of the fun has been learning about the rich history and all the research and implementations that have been done.