Jump to content

Talk:Structured programming

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Christian75 (talk | contribs) at 12:43, 20 November 2010 ({{WikiProject Computing|class=|importance=}}). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconComputing Unassessed
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
???This article has not yet received a rating on Wikipedia's content assessment scale.
???This article has not yet received a rating on the project's importance scale.

Okay, that's good then. Note that it's quite possible to write structured code using just branch instructions. It's even provable I suppose. Guess what structured code gets compiled to? It's more important to show that your code has one point of entry and one point of exit. *But* the number one rule is still that your code should be readable. Structure, OO, etc. only helps you with this, it isn't the be all and end all of readability. (Unsure how to integrate this with what's already there though)


The paragraph on top-down design and programing is now wrong. The earlier version was not particularly well written, but it was more correct. Could someone who (A) knows, and (B) can write well, please fix this? (I don't want to; i wrote the earlier version and i don't want to get into an editing war.)


Opening Explanation

I think the opening paragraph is very weak. It starts off saying that "Structured Programming can be seen as..." and then goes to categorize the subject but avoids completely defining it. As you all know, the opening paragraph should provide a clear explanation to the layperson of what the overall idea of the subject is. Calling out to any experts on the subject! —Preceding unsigned comment added by BananaManCanDance (talkcontribs) 21:36, 30 September 2007 (UTC)[reply]

Missing something

Great, structured programming removes GOTO.... Ummm... that's not the point of structured programming, I hope ;-)

The idea is to make your code more readable and maintainable, and to help to divide and conquer your problem. Right? Sooo... that might need some rewording. Kim Bruning 18:03, 31 July 2005 (UTC)[reply]

Right. Sticking, for the moment with Dijkstra, "Structured Programming" means at least two things - what he was getting at, and the more limited notion that if you simply followed a few simple rules you would automatically create good programs. The quote gives, I think, the heart of his idea, "usefully structured" was what he said. The use, the end to which his approach was the means, was even more than readability, more like understandability, and better, belief by the reader that the code was correct. His position was that the programmer needed to "demonstrate its correctness in a convincing manner". He advocated "concatenation", "selection", and "repetition" as tools for achieving this end. AJim 00:27, 21 December 2005 (UTC)[reply]

Who is Craig Davies?

(n/t) -- Kim Bruning 19:20, 4 April 2006 (UTC) ghhhgfgg[reply]

Knuth

I want --for myself-- to know the paper where Knuth proposed that "looser structural constraint.." If anyone knows? It could be written for references as well.Downtownee 13:07, 22 September 2006 (UTC)[reply]

This might be referring to Donald E. Knuth, Structured Programming with go to Statements
ACM Computing Surveys (CSUR) archive
Volume 6 , Issue 4 (December 1974) table of contents
Pages: 261 - 301
Year of Publication: 1974
ISSN:0360-0300
(Available at http://doi.acm.org/10.1145/356635.356640)
137.205.114.126 (talk) 15:38, 4 May 2010 (UTC)[reply]


== Zebulon ===

"Although there is almost never a reason to have multiple points of entry to a subprogram" This does not sound right to me. Multiple entry points in a subprogram(or function or method, whatever you wish to call it) Is the very idea behind polymorphism, and polymorphism is a centeral tenant of OO programming. So it would seem to me is there are a great many reasons to have multiple entry points in a subprogram. Wednesday, November 15, 2006 6:28 AM (UTC)

I think the context has changed. An entry point into a subprogram is not the equivalent to a method call on an object.YAC (talk) 20:47, 13 August 2008 (UTC)[reply]

GOTO by another name

Recently while taking a C language course I saw the "break" and "continue" statements are these not GOTO by another name??? And really isn't the "else" a GOTO by another name??? Most "structured" computer languages have ways of exiting a loop in an abnormal fashion are not all of these (in whatever programming language) just another form of GOTO without the "sin" of using a GOTO??? Isn't any form of IF or SWITCH/CASE (and others) really a transfer of control = GOTO??? So all talk of 1 language being better because it doesn't have a GOTO is just so much propganda. Hardheadt 22:54, 12 December 2006 (UTC)[reply]

Years ago COBOL II, I think added 'Perform Thru'. COBOL Programs generatlly had pargarph names like 1000-DO-THIS. So you could perfrom 1000-DO-THIS thru 1000-DO-THIS-EXIT, for example. If you wanted to use 1000-DO-THIS-EXIT as a clean-up point you could write a lot of convulted code with deeply nested ifs (essentially useless), or you could use a GOTO. Some places actually wouldn't allow that simple because of the GOTO. Throwing an exception is equivalent to a GOTO - I've seen amazingly complex code written to avoid exiting a function in the begninning when the arguments were invalid - yet throwing an exception in the same conditions is de riquer. But, the good do-bees that follow all the rules would probably write crap if they didn't. The trick is to know how to use them as guidelines for writing good code rather than rules that require stilted code. YAC (talk) 17:44, 10 July 2008 (UTC)[reply]

Merge

Since this is defined merely in terms of unstructured programming being the converse of structured programming, it should really be part of the structured programming article. There isn't really a discipline of 'unstructured programming' as such, but as the article says, only people who should know better ;) porges(talk) 21:34, 14 July 2007 (UTC)[reply]

I have turned Unstructured programming into a redirect. I couldn't actually find anything there worth merging here; feel free to examine the old version in the history for yourself. --Csphdmoney 18:57, 5 August 2007 (UTC)[reply]
I've always liked "Stream of Consciousness", or "And Now Do This" programming. YAC (talk) 20:44, 13 August 2008 (UTC)[reply]

Obsolete?

Is discussion of structured programming still warranted? I wore out my Structured Prorgamming Books in the 80's and used the techniques into the 90's. But if OOP is available, discussing structured programming, other than as some kind of introduction to OOP - which I don't agree is necessary, seems like a waste of time. So why am I writing this? Good question. Painted myself in a corner it seems.YAC (talk) 20:51, 13 August 2008 (UTC)[reply]

OR

While the origin of block-structured programming is easy to ref, e.g. [1], I can't find any book that uses the terminology "comb-structured programming". Pcap ping 13:35, 8 May 2010 (UTC)[reply]