Where to find 'Real' programmers online?

GOTO is useful for recursion in languages which don't have tail call optimization; It is trivial to write a naive factorial function in x86 assembly using jumps and labels.
 
It is interesting to see the same tired GOTO discussion being promulgated 70 years after Edsger Dijkstra wrote "GOTOs, considered harmful". The mass phobia of GOTO has always been unfounded. A GOTO is a valid way of exiting any logical block of code, but should never be used to enter a logical block. Unconditional jumps are in the machine code for valid reason.
 
It is interesting to see the same tired GOTO discussion being promulgated 70 years after Edsger Dijkstra wrote "GOTOs, considered harmful". The mass phobia of GOTO has always been unfounded. A GOTO is a valid way of exiting any logical block of code, but should never be used to enter a logical block. Unconditional jumps are in the machine code for valid reason.

There are better language constructs to exit nested logical blocks than goto. Well, not in C but elsewhere.
 
This will make me sound naive but...
A few of my mentors--A CS Professors and a CS Engineer--always said there are always better options than GOTO. Not sure if they were speaking to me (alone--and they used them themselves) but I was taught to reevaluate my design choices if GOTO was typed.
 
Bleh! .... #define goto(a,b) do{ return 1; }

Maybe it is. I'm okay with not using it (one less thing for me to mess up) because I have a hard enough time with ++i vs i++. I believe my mentors were trying to get me to think about the algorithms more before writing code because I was constantly getting vague instructions like "this can be done in one pass." or "dont sort." which lead me down some really interesting concepts (I miss those talks).
 
Back
Top