Path: utzoo!attcan!utgpu!watmath!att!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcvax!ukc!castle!aiai!jeff From: jeff@aiai.uucp (Jeff Dalton) Newsgroups: comp.lang.misc Subject: Re: Language Tenets (was Re: Double Width Integer Multiplication and Division Message-ID: <713@skye.ed.ac.uk> Date: 9 Aug 89 20:06:00 GMT References: <57125@linus.UUCP> <1989Jun24.230056.27774@utzoo.uucp> <1207@quintus.UUCP> <1406@l.cc.purdue.edu> <2568@etive.ed.ac.uk> <605@skye.ed.ac.uk> <1219@quintus.UUCP> Sender: news@aiai.ed.ac.uk Reply-To: jeff@aiai.uucp (Jeff Dalton) Organization: AIAI, University of Edinburgh, Scotland Lines: 28 In article <1219@quintus.UUCP> pds@quintus.UUCP (Peter Schachte) writes: >In article <605@skye.ed.ac.uk> jeff@aiai.UUCP (Jeff Dalton) writes: >>In article <1207@quintus.UUCP>, pds@quintus.UUCP (Peter Schachte) writes: >>> What good are expressions if you can't nest them? >>What good is Prolog? >Prolog is very good (1/2 :-) [for those who don't get the joke, Quintus >sells Prolog systems]. Not only that. Prolog doesn't let you nest extressions. You have to put the values in variables. (So there.) >Prolog avoids this whole problem by using relational, rather than >functional, notation. This means that multiple values may be returned >by a Prolog procedure in exactly the same way as as single value is. I'm not sure this amounts to avoiding the problem. You said that an expression that returned multiple values was "no good for anything but putting on the right side of an assignment" and asked "what good are expressions if you can't nest them?" My point was _not_ that expressions that can't be nested are just as good as expressions that can be nested but rather that they are useful nonetheless. Nonetheless, it's often easier to understand expressions when they're not nested (or not nested very deeply), and the way values are communicated in Prolog is a fairly elegant alternative to assignment.