🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6228

Re: Turing programming language.

#6228
From: John Gateley
Date: Tue, 24 Jan 1989 16:11
44 lines
2808 bytes
In article <12@euteal.UUCP> mart@euteal.UUCP (Mart van Stiphout) writes:
< 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.

This point does not really follow: at any point in the loop where there
is an exit (and Turing loops can have more than one exit I think), you
know the conditions associated with the exit. Thus, the Hoare style
axiomatic semantics can still be used to prove things about this loop.

< 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

This depends on what you call a loop. In Scheme (which of course has
loops superior to any language :^), there are no `Pascal' style loops.
Loops are done using recursion (and in particular tail recursion). This
allows more general and powerful loops to be written. It just dependss
on what style of programming you wish to use.

< I really like the idea of indexing linked list as if they were arrays.
< At the moment I am really fed up with the minimal support of
< languages like Pascal and C for linked lists. I always have
< to create records (structs) and `next' pointers. Accessing or
< adding list elements always requires extra source code for
< rather trivial operations.
< 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. Arrays are so much easier to
< handle, give fewer errors and the code looks much better.
< I'm really interested in other peoples opinions on these ideas.

I am not quite sure what you mean about 'accessing them as if they were
arrays', but any Lisp language, and other languages as well, provide the
list capabilities you are asking for: automatic allocation, easy treatment
of lists etc. 

John
gateley@tilde.csc.ti.com
Technical Details
Message-ID: <68074@ti-csl.CSNET>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!think!ames!killer!rpp386!dalsqnt!pollux!ti-csl!m2!gateley
References: <11@euteal.UUCP> <89Jan20.111000est.4328@turing.toronto.edu> <12@euteal.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!think!ames!killer!rpp386!dalsqnt!pollux!ti-csl!m2!gateley
From: gateley@m2.csc.ti.com (John Gateley)
Newsgroups: comp.lang.misc
Subject: Re: Turing programming language.
Keywords: programming language
Message-ID: <68074@ti-csl.CSNET>
Date: 24 Jan 89 16:11:28 GMT
References: <11@euteal.UUCP> <89Jan20.111000est.4328@turing.toronto.edu> <12@euteal.UUCP>
Sender: news@ti-csl.CSNET
Reply-To: gateley@m2.UUCP (John Gateley)
Organization: TI Computer Science Center, Dallas
Lines: 44