ruffsl@programming.dev to Programmer Humor@programming.devEnglish · edit-25 days agoEvery goto in the Linux kernel / Just another day on the linux-kernel mailing listyoutube.comexternal-linkmessage-square19fedilinkarrow-up180arrow-down11cross-posted to: linux@programming.dev
arrow-up179arrow-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-25 days agomessage-square19fedilinkcross-posted to: linux@programming.dev
minus-squarebss03@infosec.publinkfedilinkEnglisharrow-up4·4 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-up5arrow-down1·4 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-up3·4 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.