Re: Goto considered dramafull
Jose Da Silva <[email protected]>
| Newsgroups | gmane.comp.fonts.fontforge.devel |
|---|---|
| Message-ID | <[email protected]> |
On August 29, 2014 11:06:38 PM Thomas Shinnick wrote: > As a data point, I find "goto" used a number of times in FF already: > mainline 155 > gdraw 11 > gutils 74 Git blame will probably indicate I've authored quite a few of the ones listed above. > as well as in of course GNUlib and other friends. > > Y'all have an absolute aversion to "goto" ? 1) No aversion to goto inside the same function. Important! 2) Strong aversion to goto pointing outside of a function. Avoid long jump like the plague. You need to understand how compilers and CPUs work, and having said that, then you understand that with 1 you're still within the same stack, but with 2 you're going to make a mess, because you leave you're stack non- cleanly. My suggestion: When you do goto inside the same function, start from the top of the function, and the bottom of the function, and work your way towards the middle. You'll see that methodology in a few of the gutil routines I did. Once again, don't do long jumps out of the same function into another location - you'll only find trouble later on. ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ fontforge-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html