From: Daniel T. on 24 Apr 2010 11:14 Ali Karaali <alicpp(a)gmail.com> wrote: > I use goto to break nested for loops and I can't see a > reason to ban goto. I'll give you a reason to ban goto. This is a line of BASIC code: 90 x = 5 Now, I ask you, where is the line that was previously executed? Is it directly above line 90, is it directly below it, or could it be anywhere in the program? Because of the goto statement, simply because an unstructured "goto" is possible in the language, you have to analyze the entire program to know the answer. If we ban the use of "goto", we can confidently know exactly what line of code comes before line 90.
From: Richard on 24 Apr 2010 11:18 "bartc" <bartc(a)freeuk.com> writes: > "Daniel T." <daniel_t(a)earthlink.net> wrote in message > news:daniel_t-623394.10103424042010(a)70-3-168-216.pools.spcsdns.net... >> "io_x" <a(a)b.c.invalid> wrote: > >>> the "goto" is the key word for programming; all the remain, other than >>> goto or jmp or jc or jz, and the easy cpu layout is the wrong way for >>> programming >>> >>> i advise all you >>> Good Morning >> >> This is probably a troll, > > If this actually is io_x, then he really believes this stuff. > >> but it is a good opportunity to suggest to >> everyone who is tempted to argue about this issue to start from >> Dijkstra's paper rather than simply asserting that "goto is good" >> without understanding the issues involved. >> >> http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_ >> Harmful.html > > And then read Knuth's "Structured Programming with go to Statements" (a bad > scan is here: > http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf) > > "... programmers and language designers still feel the need for some > euphemism that 'goes to' without saying 'go to' ..." Recommending Knuth is like telling someone they need to qualify as a NASA rocket scientist in order to fly a kite. -- "Avoid hyperbole at all costs, its the most destructive argument on the planet" - Mark McIntyre in comp.lang.c
From: bartc on 24 Apr 2010 11:46 "Daniel T." <daniel_t(a)earthlink.net> wrote in message news:daniel_t-DBCC13.11141024042010(a)70-3-168-216.pools.spcsdns.net... > Ali Karaali <alicpp(a)gmail.com> wrote: > >> I use goto to break nested for loops and I can't see a >> reason to ban goto. > > I'll give you a reason to ban goto. This is a line of BASIC code: > > 90 x = 5 > > Now, I ask you, where is the line that was previously executed? Is it > directly above line 90, is it directly below it, or could it be anywhere > in the program? Because of the goto statement, simply because an > unstructured "goto" is possible in the language, you have to analyze the > entire program to know the answer. If we ban the use of "goto", we can > confidently know exactly what line of code comes before line 90. Goto's at least are usually confined to the same function; if the function is smallish, you don't have to look far to match a goto with a label. Most languages will allow "x=5" inside a function; where is that function called from? It could be from anywhere in hundreds of modules. -- Bartc
From: Leigh Johnston on 24 Apr 2010 11:48 "Daniel T." <daniel_t(a)earthlink.net> wrote in message news:daniel_t-DBCC13.11141024042010(a)70-3-168-216.pools.spcsdns.net... > Ali Karaali <alicpp(a)gmail.com> wrote: > >> I use goto to break nested for loops and I can't see a >> reason to ban goto. > > I'll give you a reason to ban goto. This is a line of BASIC code: > > 90 x = 5 > > Now, I ask you, where is the line that was previously executed? Is it > directly above line 90, is it directly below it, or could it be anywhere > in the program? Because of the goto statement, simply because an > unstructured "goto" is possible in the language, you have to analyze the > entire program to know the answer. If we ban the use of "goto", we can > confidently know exactly what line of code comes before line 90. This channel is about C++ not BASIC, you do not have to analyze the entire program in C++ as goto can only jump within the same function so comparisons with BASIC is silly. /Leigh
From: Kenny McCormack on 24 Apr 2010 11:50
In article <EIOdnQHlmcFTj07WnZ2dnUVZ8h-dnZ2d(a)giganews.com>, Leigh Johnston <leigh(a)i42.co.uk> wrote: .... >This channel is about C++ not BASIC, you do not have to analyze the entire >program in C++ as goto can only jump within the same function so comparisons >with BASIC is silly. (Channelling Kiki) >This channel channel??? >is about C++ not BASIC, you do not have to analyze the entire C++ is not C (so says Kiki every chance he gets) -- > No, I haven't, that's why I'm asking questions. If you won't help me, > why don't you just go find your lost manhood elsewhere. CLC in a nutshell. |