Skip to main content
47 events
when toggle format what by license comment
Oct 13, 2017 at 12:51 vote accept ctrl-alt-delor
Oct 11, 2017 at 18:01 comment added ctrl-alt-delor @MichelBillaud I have just noticed in your fist comment: “control structures are not always the clearest way to express the variety of "[control] structures"”. I think you are saying that sometimes even modern languages, lack the needed control structures, so sometimes we still need to synthesise them with a jump/goto. (see my answer, I think I covered this.)
Oct 11, 2017 at 16:20 comment added Michel Billaud @ctrl-alt-delor I'm impressed by the argument of authority :-) I'm not advocating for spaghetti code. If you have ten things to check before doing some thing, better write is as "action 1 ; if test1 fails return; action 2, if test2 fails return; .... if test10 fails return; you_can_do_it_now()" the code is easier to maintain than multi level imbrication. That's not unstructured code, but structured ideas expressed in a language lacking the proper control structures. Talking about authorities in SP, even Disjkstra had his "skip" and "abort" statements...
Oct 11, 2017 at 13:37 comment added ctrl-alt-delor @MichelBillaud I have worked on very complex systems. I write highly structured code, and never go beyond 4 levels of indentation, and rarely more than 3. I have heard all the excuses before. You can not untangle spaghetti; If you think spaghetti, it is too late. You can not convert it in to structured.
Oct 11, 2017 at 10:14 comment added Michel Billaud structured-programming control structures are not always the clearest way to express the variety of "structures" you have in mind when programming. An easy example : business application where you have to do a dozen of tests (like field contents is numeric or blank, value doesnt exceed something etc.) before doing the real job. You probably dont have a 12-level intrication in mind.
Oct 10, 2017 at 22:16 history edited ctrl-alt-delor CC BY-SA 3.0
improve readability
Oct 9, 2017 at 1:43 comment added ncmathsadist I never teach this statement. It is a guaranteed creator of congealed spaghetti code. Do things in a structured way.
Oct 3, 2017 at 9:38 comment added user207421 Last flowchart I did was in 1979, and I never had much faith in them even when I was taught them in 1971. For a start they reduce every non-trivial and trivial action or decision to the same sized box. For another thing, they draw on graphic skills that CS students tend not to have: at least I didn't. There is no harm and indeed a considerable necessity in teaching JMP, but goto as a language construct has certainly seen its last hurrah.
Oct 2, 2017 at 4:22 comment added Yet Another User goto can be helpful in languages such as C to avoid repeating oneself in error handling code, where its scope handling provides a legitimate advantage, as well as in escaping multiple nested loops.
Oct 1, 2017 at 12:58 answer added ctrl-alt-delor timeline score: 2
Sep 30, 2017 at 16:53 comment added ctrl-alt-delor @GwenKillerby I have added a link to one of the copies of the paper. You are correct if then else while for etc all use goto, however Dijkstra's argument was that these are some safe ways to use goto. We call it structured programming. I and others would argue that this is not enough, that conditionals, and mutation are also a problem, but like goto they can be tamed with appropriate structures. I use conditionals and mutation very little, and have an intuition an how to use them well. As a consequence my code have very few bugs.
Sep 30, 2017 at 16:47 history edited ctrl-alt-delor CC BY-SA 3.0
added 217 characters in body
Sep 30, 2017 at 13:15 comment added GwenKillerby @ctrl-alt-delor Not to be flippant, (well, a little) but what is IF THEN ELSE but a giant Go-To? As in: Step-Skipper? But please show us the 1960 article, so we can judgje for our selves. For now, it seems that your own biases have led you to a hasty judgment.
Sep 30, 2017 at 9:11 comment added Restioson @ctrl-alt-deor oh, I'm sorry, I accidentally left that out I guess. Essentially, I see great value in being able to reconcile code with the flow of your program, and being able to visualise it like that. It's an exceptionally useful debugging tool too - whenever I have mangled or wrong output, I mentally step through my program, like a flowchart, to see what's gone wrong
Sep 29, 2017 at 18:48 comment added ctrl-alt-delor @Restioson your comment has no information, except that you have an opinion. Can you elaborate?
Sep 29, 2017 at 17:40 comment added Restioson There is always value in teaching flow charts, at least in my opinion. (Disclosure: I am not an educator, just a programmer :) )
Sep 29, 2017 at 15:26 answer added T.E.D. timeline score: 0
Sep 29, 2017 at 11:28 answer added Jean-Baptiste Yunès timeline score: 1
Sep 29, 2017 at 2:42 comment added alephzero Look at it from the other end of the telescope:: Language features like if-then-else, while loops, break and continue keywords in loops, case constructs, catch-throw exceptions, function calls, recursion, etc, etc are just syntactic sugar to avoid using that nasty G-word (and in some instances, to avoid explicitly using a stack as well). Of course you can use the G-word for other programming purposes as well as the ones where the language designers gave you a sugar-coated alternative - and some of them are perfectly good ways to write code in real life, but others are not!
Sep 28, 2017 at 22:56 answer added Gilles 'SO- stop being evil' timeline score: 6
Sep 28, 2017 at 21:42 comment added Kevin Flow charts show up again in intermediate computer science in the form of finite state machines, which are basically flowcharts with set theory thrown at them in order to be mathematically precise.
Sep 28, 2017 at 18:35 comment added SIGSTACKFAULT Relevant xkcd
Sep 28, 2017 at 16:47 answer added hotpaw2 timeline score: 3
Sep 28, 2017 at 16:28 comment added ctrl-alt-delor @Jasmine the article is advocating direct use of goto, that is by using the goto keyword. I have said that goto is useful in teaching assembler language (they have branch/jump instructions).
Sep 28, 2017 at 16:14 comment added Jasmine You are confusing the "goto concept" with the "goto keyword" - the latter of which is generally considered bad, but that's actually more of a religious objection than a practical one. Every loop, every recursion, every function call, is a GOTO/GOSUB conceptually. We can't program anything without that concept.
Sep 28, 2017 at 15:23 answer added Quentin timeline score: 0
S Sep 28, 2017 at 12:51 history suggested CommunityBot CC BY-SA 3.0
Fixed grammar
Sep 28, 2017 at 12:31 review Suggested edits
S Sep 28, 2017 at 12:51
Sep 28, 2017 at 8:26 history edited ctrl-alt-delor CC BY-SA 3.0
added 136 characters in body
Sep 28, 2017 at 8:25 answer added Stilez timeline score: 0
Sep 28, 2017 at 7:50 comment added Simon Richter If you don't teach the kids about goto, they will learn it on the streets.
Sep 28, 2017 at 7:50 answer added Sean Houlihane timeline score: 4
Sep 28, 2017 at 7:49 answer added Michel Billaud timeline score: 0
Sep 28, 2017 at 6:59 comment added Michel Billaud @immibis "computer doing things in order" : a typical misunderstanding is thinking that during a while ( x != 0) { statements; }, the x variable is monitored during the statements execution, and the loop break as soon as x gets the value 0.
Sep 28, 2017 at 3:11 answer added Manngo timeline score: 9
Sep 27, 2017 at 23:31 comment added Stack Exchange Broke The Law You'd be surprised how many people don't seem to get "the computer does things in the order they're written" - flowcharts might help explain that.
Sep 27, 2017 at 21:41 answer added Pikalek timeline score: 4
Sep 27, 2017 at 20:42 answer added Lord Farquaad timeline score: 12
Sep 27, 2017 at 20:32 comment added RonJohn As an old programmer (learned on a TRS-80 in 1980), I think that teaching GOTO is a good idea, because it teaches the students that at the bottom of all that fancy flow control and OO stuff are nothing but jumps (both conditional and unconditional) and pointers.
Sep 27, 2017 at 20:17 answer added Peter - Reinstate Monica timeline score: 17
Sep 27, 2017 at 20:09 history edited ctrl-alt-delor CC BY-SA 3.0
added 21 characters in body
Sep 27, 2017 at 19:36 history edited Buffy CC BY-SA 3.0
corrected title; edited tags
Sep 27, 2017 at 19:21 answer added Ben I. timeline score: 9
Sep 27, 2017 at 18:57 answer added Paul Powell timeline score: 61
Sep 27, 2017 at 18:29 comment added VisualMelon I disagree that goto has no place; I would agree that there is little value in teaching it to new programmers: it can be mentioned (and discouraged) and they can work it out for themselves when (if) they need it. There is nothing to it if you can already 'read' code, and one is more likely to understand why it is generally inadvisable with an existing understanding of higher-level flow-control techniques (as opposed to "Here is goto! NEVER USE IT")
Sep 27, 2017 at 17:06 answer added Buffy timeline score: 5
Sep 27, 2017 at 16:36 history asked ctrl-alt-delor CC BY-SA 3.0