ruffsl@programming.dev to Programmer Humor@programming.devEnglish · edit-229 days agoEvery goto in the Linux kernel / Just another day on the linux-kernel mailing listyoutube.comexternal-linkmessage-square19linkfedilinkarrow-up11arrow-down10
arrow-up11arrow-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-229 days agomessage-square19linkfedilink
minus-squarebss03@infosec.publinkfedilinkEnglisharrow-up0·28 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-up0·28 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-up0·28 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.