[問卦] goto considered harmful ?

看板Gossiping作者 (sarsaparilla)時間1年前 (2022/05/27 16:59), 編輯推噓0(227)
留言11則, 6人參與, 1年前最新討論串1/1
如題 肥宅在review學妹的扣 發現她寫了一堆goto 幹!! 是在寫組語嗎? 要不要直接用jmp 遇到這種學妹該怎麼辦? 直接逐出實驗室嗎? -- https://i.imgur.com/2xc8sUZ.png
https://i.imgur.com/bC6Ygol.png
https://i.imgur.com/qtgSJeG.png
https://i.imgur.com/2mlMBsT.png
-- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 49.216.90.214 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Gossiping/M.1653641983.A.3DE.html

05/27 17:00, 1年前 , 1F
月工
05/27 17:00, 1F

05/27 17:01, 1年前 , 2F
醒醒 你沒有學妹
05/27 17:01, 2F

05/27 17:02, 1年前 , 3F
五樓屌的code寫goto 6樓月工門
05/27 17:02, 3F

05/27 17:05, 1年前 , 4F
2022 了不要思想這麼古板
05/27 17:05, 4F

05/27 17:10, 1年前 , 5F
用longjmp/setjmp會比較好看嗎?
05/27 17:10, 5F

05/27 19:29, 1年前 , 6F
很多 exception handling 都是用 g
05/27 19:29, 6F

05/27 19:29, 1年前 , 7F
oto 實現 主要
05/27 19:29, 7F

05/27 19:29, 1年前 , 8F
是在allocate 失敗的時候 要善後
05/27 19:29, 8F

05/27 19:29, 1年前 , 9F
不然會 memory
05/27 19:29, 9F

05/27 19:29, 1年前 , 10F
leak 可以 參照 linux module 裡
05/27 19:29, 10F

05/27 19:29, 1年前 , 11F
面很多這種寫法
05/27 19:29, 11F
文章代碼(AID): #1Ya9B_FU (Gossiping)