Hey...! I was pleasantly surprised when it came back :p
More discussion neede !! :D :D ;)
Printable View
Hey...! I was pleasantly surprised when it came back :p
More discussion neede !! :D :D ;)
When I was student, my C language teacher told us, no matter how good project we made, if we used goto even once, he wouldnt accept our project. In addition, he didn’t teach us the functionality of goto to make us goto-free programmer. I can safely say that I never use goto in my any C or C++ program and I never needed to do it.
The only use of goto, which I can recall, is in MS-COBOL and GWBasic languages, but at that time I didn’t know about structured or even object oriented programming. Oh yes, still using it in assembly language programming.
That's another typical example of the hysterical anti-goto dogmatism mentioned above... ;)Quote:
Originally Posted by Zeeshan
Wondering why this type of debate is not seen regarding the elusive "ComeFrom" instruction......
Ahh, a fellow initiate of the most underappreciated language ever created:Quote:
Originally Posted by TheCPUWizard
Intercal
"Abandon All Sanity, Ye Who Enter Here"
Jeff
If I were a teacher/professor I would say exactly the same (actually I say it to anyone asking about goto). I would fail anyone that used goto... :cool: Call me hysterical anti-goto dogmatic but that's how I feel about it. Goto is the first thing I would get rid of from C/C++.Quote:
Originally Posted by Zeeshan
Actually, I was trying to lift that discussion to another level: My remark (and the previous, longer post) were not directly related to the use of the goto statement itself, but about a category of persons who are stubborn and inflexible enough to make a religion out of something as arcane as the general use of a single language feature. Did you want to say with your post that you belonged to that category? :D ;)Quote:
Originally Posted by cilu
When it comes to goto, definitely... :D ;)Quote:
Originally Posted by gstercken
Do you know that song:
Quote:
imagine there's no country
nothing to kill or dying for
and no goto
imagine all the people
living life in peace
you may say i'm a dreamer
but i'm not the only one
i hope some day you'll join us
and the world will be at one...
As you know, Liverpool is where The Beatles came from.... and a few years ago, Liverpool airport renamed itself to "John Lennon Airport" and adopted the slogan "above us only sky" - a direct quote from his song, Imagine.
Then somebody started spreading rumours around that their baggage handlers had decided to adopt another line from the same song....
"imagine no possessions" :D :D
Probably I would say "don't goto John Lennon Airport"... :D :wave:Quote:
Originally Posted by John E
... ...
Quote:
I felt a great disturbance in the Force, as if millions of voices suddenly cried out in terror "please close this thread".
:eek: And I thought the Whitespace language was bad!Quote:
Originally Posted by jfaust
Microsoft should rarely be used as an example of good coding practice. I haven't used GoTo since I quite programming is QuickBasic 10 years ago.Quote:
Originally Posted by TDM
Heck I just want to be part of a goto thread, I have always admired these things...
//As a side note.. I have never used goto, but I don't know why, It just seems to
//have turned out that way. I think I am goig to put a goto into the C++ code I
//am wrting right now, just because I don't like people telling me what to do, and
//this goes double if the person is a Professor
Quite a few languages have "goto" statements and they may or may not be necessary depending on the structure of the language. Every assembly language I ever used had a goto and you needed to use it. There was no way around it. I believe Basic has a necessary goto also (I have very little experience with Basic). I can't remember if Fortran does or not (I haven't even seen Fortran since my college days).
Goto is a part of C (and C++), but the structure of the language makes it unnecessary except for handling some extreme error conditions. The language has a better way of writing a program.
There is some dogmatism about goto in C and C++, but there are some practical reasons for it too. Not only is a program listing more readable by a human without gotos, but I don't believe modern optimizing compilers won't optimize code with a lot of gotos very well, which will make the program run slower.