From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,24ac4e1c8cbfe3c X-Google-Attributes: gid103376,public From: "Vladimir Olensky" Subject: Re: histrionics Date: 1999/09/11 Message-ID: X-Deja-AN: 523711680 References: <37D670CE.855F96BD@interact.net.au> <37D678E4.9867000B@interact.net.au> <37d74de9@eeyore.callnetuk.com> <7r8c60$b2q$1@nnrp1.deja.com> <7r9rkj$g75$1@nnrp1.deja.com> <7rcddd$bfd$1@nnrp1.deja.com> Organization: Posted via Supernews, http://www.supernews.com X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Newsgroups: comp.lang.ada X-Complaints-To: newsabuse@supernews.com Date: 1999-09-11T00:00:00+00:00 List-Id: Robert Dewar wrote in message <7rcddd$bfd$1@nnrp1.deja.com>... >In article , > "Vladimir Olensky" wrote > >> May be this is because writing complex programs in Prolog >> requires very high level of abstract thinking to be able to >> express complex problems using short logic predicates >> sentences. > >Actually I disagree strongly with your criticisms of Prolog. >On the contrary, I think it is MUCH easier to think at the >prolog level, than to think in the low level sequential >manner that conventional programming requires (as I mentioned >the sad thing in Prolog, is that once you use cut, which in >practice you do need to in real programs, you have to go back >to much lower level thinking). > >> It is always more easy to describe something in many words >> than in couple of words:-) > >No, again I disagree, the power of very high level languages >is directly related to the fact that you want to be able >to describe things at a much higher level, and of course >the descriptions are shorter. If I can say (this is SETL, >without the nice character set :-) > >primes = {n in 2 .. 100 | > notexists j in 2 .. n - 1 | > n mod j = 0}; > >that's a WHOLE lot easier to understand than a seive programmed >in a conventional procedural language. Vladimir, you can supply >the corresponding prolog program if you like :-) I prefer the >statement in SETL, since it seems close to the mathematical >definition of primes, both syntactically and semantically > >> Another thing is that it may be difficult for many people to >> grasp= the idea of backtracking > >Actually the nice thing about angelic non-determinism is >precisely that you DON'T need to think about it, the right >thing happens. Backtracking is not a fundamental part of >the semantics of Prolog at a high level, rather it is an >implementation mechanism for acheiving a correct pattern >match as required by angelic ND. Of course, once again, >if you worry about cut, then suddenly the backtracking >becomes non-transparent. A very similar situation happens >in SNOBOL-4 pattern matching, which at best can be considered >to be fully declarative, but which provides lots of cut-like >low level junk that requires you to know the procedural >algorithm that is used. > >> and recursion > >Surely you are not saying recursion is hard to understand. Sure >I know that beginning students may have trouble, but surely >anyone who considers themselves a competent professional >programmer has got past this long ago, and is completely >comfortable with recursion ... > >> Iterative algorithms implemented using conventional languages >> may have much more lines of code but be much more easy >> understandable. > >This is the kind of criticism you expect from someone who >basically does not like Prolog :-) I would strongly disagree >an elegant program written in Prolog is far far easier to >understand than the extended gobbledygook that passes for >low level procedural programming :-) > >So, it's interesting, Dewar and Olensky have almost >diametrically opposed views of Prolog. > >Dewar likes very high level languages in general, and finds >examples of programs written in these languages compelling, >and for examples, that feeling applies to Prolog. Elegant >Prolog examples, even quite complex ones are quite >beautiful, easy to understand, concise, and clear. > >Where Dewar gets off the Prolog admiration bus is where people >claim that it is an appropriate and practical language for >writing large scale applications, including expert systems. > >Olensky on the other hand is rather suspicious of Prolog, thinks >it is hard to understand because of backtracking, logic etc, but >nevertheless thinks it is the language of choice for large >complex expert systems. > >Interesting .... > As I matter of fact it is not my personal opinion of Prolog. I tried to imagine what could think about that an ordinary person with conventional programming language experience. The formula "if I were someone else" sometimes very useful when one tries to understand why something is happening this particular way. (Your remark that many expert systems are written in other languages than Prolog). Along with technical reasons there are always psychological reasons such as people mentality, habits, influence of the environment etc. Very often human factor prevails over technical reasons. As for me I never blame people that they are doing something their own way. I always try to put myself in their place and understand their reasons. As far as for very high level abstract logic thinking not all the people have such ability. May be 2-5 % of all. Such people became professors in their field. And most of the programmers are not CS professors. This explains a lot of things. Moreover a lot of people are very reluctant to learn something new that are beyond their current experience and knowledge. Regards.