ruffsl@programming.dev to Programmer Humor@programming.devEnglish · edit-214 days agoEvery goto in the Linux kernel / Just another day on the linux-kernel mailing listyoutube.comexternal-linkmessage-square18fedilinkarrow-up169arrow-down11cross-posted to: linux@programming.dev
arrow-up168arrow-down1external-linkEvery goto in the Linux kernel / Just another day on the linux-kernel mailing listyoutube.comruffsl@programming.dev to Programmer Humor@programming.devEnglish · edit-214 days agomessage-square18fedilinkcross-posted to: linux@programming.dev
minus-squarebss03@infosec.publinkfedilinkEnglisharrow-up2·13 days agoJava doesn’t allow goto, but specifically does have labels for labeled break/continue to support the multi-loop exiting case. I imagine these two “structures” will always be implemented in C source through disciplined use of goto.
minus-squareGladaed@feddit.orglinkfedilinkarrow-up3·13 days agoIt’s literally the only way to do this. Other ways include checking of loads of bools. That’s slow.
minus-squarebss03@infosec.publinkfedilinkEnglisharrow-up2·13 days agoIn C maybe. In language that support proper recursion schemes, the apomorphism models the early-exit loop.
Java doesn’t allow goto, but specifically does have labels for labeled break/continue to support the multi-loop exiting case.
I imagine these two “structures” will always be implemented in C source through disciplined use of goto.
It’s literally the only way to do this. Other ways include checking of loads of bools. That’s slow.
In C maybe. In language that support proper recursion schemes, the apomorphism models the early-exit loop.