Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.c Subject: Re: Small Device C Compiler 3.6.0 released Date: Sat, 18 Jun 2016 02:18:35 +0100 Organization: A noiseless patient Spider Lines: 89 Message-ID: <87fusbthuc.fsf@bsb.me.uk> References: <87pork1zyk.fsf@bsb.me.uk> <87mvmoymg9.fsf@bsb.me.uk> <87eg7zzv7e.fsf@bsb.me.uk> <87inxay7xp.fsf@bsb.me.uk> <3c9dee3b-2fff-4b07-bf50-613a2d6746a7@googlegroups.com> <87ziqlussg.fsf@bsb.me.uk> <87bn30vl7c.fsf@bsb.me.uk> <87shwbtuas.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="726"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18z5w3FRU3tryk7mHzJglhr8KXWOEljUMg=" Cancel-Lock: sha1:oiJydakxnrpauPlhjC8cCpvd8E4= sha1:ND44mDPAoH0+R6c7Cey/CNfHkfU= X-BSB-Auth: 1.e1fb1d6fdbb9d4c81f5f.20160618021835BST.87fusbthuc.fsf@bsb.me.uk Xref: csiph.com comp.lang.c:89484 Malcolm McLean writes: > On Friday, June 17, 2016 at 9:49:43 PM UTC+1, Ben Bacarisse wrote: >> Malcolm McLean writes: >> >> > Are you sure? >> > Are you sure that the tree as I have described it is not the >> > "structure" of "structured programming"? >> >> You don't really care do you? That sounds like a rhetorical question. >> But if you want an answer, yes, I am about as sure as I can reasonably. >> I am reasonably well-educated in the field and I've read many books and >> papers on the subject. >> > So you haven't understood what you've read. I thought there was not much point in my answering that question! >> > What other thing would you say the "structure" refers to? How >> > does it differ from the tree of functions or "blocks" that I >> > have described? >> >> The most striking feature is the you invented this tree to show that >> recursion is unstructured or, at least in some significant way, >> antithetical to the structured approach, but nearly every author I've >> read on the subject includes recursive programs as examples of >> well-structured programs, and none at all exclude recursion for being >> antithetical to the notion. Clearly being "structured" means something >> else for all these authors. >> > No, I did not invent structured programming, I did not invent > the idea of "blocks" with one point of entry and one point of exit, > I did not invent the idea that such blocks nest. I did not invent > subroutines. Where does all that come from? I never said you invented any of those things. The only thing I think you invented was the tree that is neither the call graph nor the calling context tree. > I was maybe the first to point out that recursion breaks or > strains the paradigm, Ah, so you are not re-defining the term at all. You are just pointing out that Wirth and Dijkstra and Hoare and all the others did not see that they were wrong to admit recursive programs into what they themselves had defined as being structured programs. Surely there's a paper in that? There are lots of academics like me who believed that Wirth and Dijkstra and Hoare and the others had understood the idea they were promoting. > but I did not invent the notion of > nested blocks. Again, I never said you did. > The "tree" is not my idea. I'm not the first > person to point out that a structured program with its subroutines > forms a tree. But you are the first person to mangle this trivial idea. You insist on a tree, so you must reject the usual call graph, but you also reject the calling context tree since that is a tree even for recursive programs. Can you site anyone who defined the tree as you do? (I know, I'm asking for citation, but if you write that paper you'll need one anyway since the idea is not yours.) (You've also mangled it by claiming that calls to functions via pointer parameters can't be represented, but that notion seems to have died without ever being resolved.) >> By the way, do you think structured programming is a good idea? I ask >> because you sometimes urge the use of what I think of as unstructured >> code (in the usual sense, that is) as being the best option for some >> some very common situations in C -- resource clean-up on error for >> example. >> > Yes, there's a superstitious avoidance of "goto". I don't think you've understood authors like Dijkstra and Hoare if you think that avoiding jumps from multiple point into some piece of code is simply superstition. All those authors may be wrong, of course, but their arguments are anything but superstitious. To refute them you'd have to address them. -- Ben.