Path: utzoo!attcan!uunet!husc6!rutgers!noao!arizona!mike From: mike@arizona.edu (Mike Coffin) Newsgroups: comp.lang.misc Subject: Re: Turing programming language. Message-ID: <8861@megaron.arizona.edu> Date: 24 Jan 89 16:42:35 GMT References: <12@euteal.UUCP> Organization: U of Arizona CS Dept, Tucson Lines: 34 From article <12@euteal.UUCP>, by mart@euteal.UUCP (Mart van Stiphout): > Let me explain my objections to the Turing loop syntax. My main > objection is the location of the exit criterion. It is inside the > loop and generally will be surrounded by (lots ?) of code. As we > all know, the correctness of loops can be shown by pre- and > postconditions and the invariant relation. In my view, the stop > criterion should not be located somewhere in the middle of the > loop. Furthermore, in my opinion your Pascal examples of loops > proof their superiority to the Turing loops: the loop type is clear > in a glance. I think it's ok to use different notations for > different loops I'm not sure what the pre- and post-condition have to do with where the loop exit is. The loop invariant has nothing to do with where the exit is, and the other part of the post-condition is exactly the exit condition. Again, it doesn't matter where the exit is. In a practical sense, it is very useful to exit a loop from the middle sometimes. Almost all programming languages recognize this and provide some way to do it: C has break, Pascal has goto, etc. Turing just attempts to make this less of an exception. With proper formatting, it is just as obvious what kind of loop it is. > Why can't there be a programming language with type list that > automatically allocates memory if needed and allows treatment of > list in a similar way as arrays. There are lots of them. CommonLisp, Scheme, Icon, etc. -- Mike Coffin mike@arizona.edu Univ. of Ariz. Dept. of Comp. Sci. {allegra,cmcl2}!arizona!mike Tucson, AZ 85721 (602)621-2858