My teacher told me never to use goto statements, trying to figure if there's another reason apart making the code less reable
Was wondering if this would cause an infinite memory usage because of redeclaring a variable each "loop" ? Or will the garbage collector empties the memory once we go out of scope ?
In both cases it would be an infinite loop, I do not think the memory usage would be much different but it would lock the program and use 100% cpu
Your teacher is correct in telling you not to use gotos while there may be some rare occasions where it would be the thing to do as a general rule of thumb they should not be used and will make your program hard to follow, hard to debug and show anyone who reads your code that you have not developed proper programming methods.
How the compiler figured out that ? I didn't compiled in relase, i was in debug. Could someone explains me to what extent the compiler actually interprets the code ?
Bookmarks