Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site decwrl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!ucbvax!decwrl!dec-rhea!dec-logic!vantreeck From: vantreeck@logic.DEC Newsgroups: net.lang.prolog Subject: Prolog syntax Message-ID: <3030@decwrl.UUCP> Date: Mon, 8-Jul-85 15:54:50 EDT Article-I.D.: decwrl.3030 Posted: Mon Jul 8 15:54:50 1985 Date-Received: Wed, 10-Jul-85 23:52:14 EDT Sender: daemon@decwrl.UUCP Organization: DEC Engineering Network Lines: 97 I'm glad to see all the responses. I was wondering if very many read this notes file. Text from: Ray Reeves, CCA-UNIWORKS,20 William St,Wellesley, Ma. 02181. (617)235-2600 emacs!ray@CCA-UNIX >Organization: CCA Uniworks, Wellesley, MA . . . >On the other hand, his endorsement of systems that modify >text behind your back seems capricious. What possible >merit is there in constraining the expressive power of the >ASCII set of characters? Modify what text? Did I say something I didn't mean. >His plea for a more pedantic style of syntax is misplaced. >Any Prolog can be made to support a special interface, what >the Lisp style does is represent a clause with minimum >syntax, and the fact that it can be entered that way is >much appreciated by those who don't care for typing. >Building spurious noise marks into the syntax has the >unfortunate consequence of preempting those marks from use >elsewhere. >The important point about Lisp syntax is that it is more >suitable for reflective programming. Not only does it >vitiate the need for "univ" but it enables a term to be >represented totally abstractly, whereas reference to a >structure needs some knowledge of it's form. For example, >"((X|Y)|Z)" in micro-Prolog matches any clause. >Meta-programming in Dec-10 style is a much more clumsy >business. Indeed, the S-expression of Lisp is a powerful syntax to express both functional and logic programming, e.g., the language TAO. Other languages, e.g., APL, have put a higher premium on expression "with a minimum of syntax" than on ease of reading. It's said that C code can be made very readable. Unfortunately, too many follow the path least resistance. I think that the DoD chose a Pascal-like syntax for Ada, because it tended to encourage self documenting code. Suppose a major computer/software company were going to market a language for which there is no standard. Should the company make it's implementation such that it targets those logicians and AI researchers that prefer the economy of expression? Or should it make its implementation be usable by logicians and AI researchers by remaining within the bounds of first order logic and also provide software engineering features that the more conventional software shops prefer? Some large corporations are staffing up with PhDs to lead the development of expert systems. But many of the programmers will be in house people from COBOL/FORTRAN backgrounds who will have to learn a new language. Having tried to introduce some people to Prolog, I've learned that most have enough difficulty understanding bactracking, cut, and unification. And the syntax was no great help in the learning process. The last thing these people need to hear about are S-expressions, lambda calculus, predicate calculus, horn clauses, etc.. Their need is very pragmatic: "This is what I want to do. How do I do it in Prolog?" >The idea of a "lambda" style syntax is also good, but I >suggest that lambda is a better word than "for_all", which >suggests universal quantification. Variables that do not >first appear in the head are not universally quantified. "for_all" is not a universal quantifier. It is an existential quantifier, i.e., one per clause. Want an alternative name? Lambda? Sounds like Greek to me. How about an existential quantifier that I can understand, like "exists". >It seems to me that soft cuts under a disjunction are very >important. There is a distinct need for them there, and >the semantics of soft cut in that context does not seem >strange if the disjunction is thought of as a separate >anonymous clause set which has been made local to share >variable scope and generally increase efficiency. That, >after all, is what it is. The practise of treating cuts >under a disjunction as soft seems quite satisfactory. Should cut be implemented in a way that allows one to write a faster program, or should cut behave in a consistent manner? I think it's a question of speed versus consistency. I vote for consistency (the hard cut). When I say cut, that means that I want to exit the procedure on backtracking to the cut - no exceptions.