imlah@canon.co.uk (Bill Imlah) (04/26/91)
ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: >Why in the name of sanity are >you abusing the word "functor" (which means a pair consisting of a >function symbol and an arity, e.g. fred/2) when you mean "term"? Surely its an common mistake. Mostly people coming to grips with Prolog don't play around with terms enough for the distinction to become salient. -------------------------------------------------------- Bill Imlah imlah@canon.co.uk Natural Language Group Canon Research Centre Europe, 17/20 Frederick Sanger Rd. The Surrey Research Park, Guildford, Surrey, GU2 5YD, UK. -- "When I use a word", Humpty Dumpty said in a rather scornful tone,"it means just what I choose it to mean - neither more nor less" -- Alice through the Looking Glass
ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) (04/30/91)
In article <1991Apr26.081315.18922@canon.co.uk>, imlah@canon.co.uk (Bill Imlah) writes: > ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: > >Why in the name of sanity are > >you abusing the word "functor" (which means a pair consisting of a > >function symbol and an arity, e.g. fred/2) when you mean "term"? > Surely its [sic] an [sic] common mistake. Mostly people coming to > grips with Prolog don't play around with terms enough > for the distinction to become salient. But every argument to any Prolog predicate *is* a term. The only way one can fail to "play around with terms" is to write only predicates that have no arguments! Surely the language itself makes it plain: "functors" are the things that "functor/3" gives you. The DEC-10 Prolog manual contained the statement "one may think of a functor as a record type"; that's been copied into several manuals. Do Pascal programmers talk about individual records as "types"? An explanation I _would_ believe is "shockingly bad teaching". I am sick of Prolog text-books written by people who didn't bother to learn the language. -- Bad things happen periodically, and they're going to happen to somebody. Why not you? -- John Allen Paulos.
imlah@canon.co.uk (Bill Imlah) (05/01/91)
ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: >In article <1991Apr26.081315.18922@canon.co.uk>, imlah@canon.co.uk (Bill Imlah) writes: >> Surely its [sic] an [sic] common mistake. Mostly people coming to >> grips with Prolog don't play around with terms enough >> for the distinction to become salient. >But every argument to any Prolog predicate *is* a term. >The only way one can fail to "play around with terms" is to >write only predicates that have no arguments! enough (adv): as many or as much as necessary - Oxford Advanced Learner's Dictionary -------------------------------------------------------- Bill Imlah imlah@canon.co.uk Canon Research Centre Europe, 17/20 Frederick Sanger Rd. The Surrey Research Park, Guildford, Surrey, GU2 5YD, UK. Dyslexic disclaimer: the views typed by my fingers are not necessarily those of my [sick] brain