As long as a language has goto, it isn't intrinsically bad to use it.
It is possible to use it either in a right or in a wrong way.
The thing is that as a language has a higher level than others, it is in general spontaneously easier and natural to avoid using goto.
Now, I find myself all the time converting higher-level code to Assembly by hand. In that case, you can see that down to the bare metal level all of your loops, conditional code and the like, must be converted to conditional Assembly instructions that work exactly like goto, and in general it can't be avoided at that point (which by the way is by no means an obsolete environment but just the very essence of a machine).
I also find myself converting Assembly code to higher-level code, and in this case I must find ways to do it efficiently. I almost never need to use goto when doing this.
In other words, knowing how to use goto properly is necessary, not to be abused and not to be ignored either (specially if you know and want to use Assembly language, among other things, to work a little bit in designing or understanding compiler-like programs that generate Assembly code).
If you use it too much in a high-level language, chances are that you are still in a very incipient level of knowledge for a proper implementation of your logic when you could use syntax elements better suited for what you want to achieve in that language (e.g., using goto for no special reason when you could have used a while loop that maybe you just didn't know how to use).
~Member Since 14 Nov 2012
Offline Last Active Nov 16 2012 05:22 PM
- Group Members
- Active Posts 1
- Profile Views 46
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
~ hasn't added any contacts yet.
No latest visitors to show