Hacker News new | past | comments | ask | show | jobs | submit login

But you can also do that with recursion

if failed: do_thing()

This is covered in the Julia docs, where they argue recursion is more readable than goto

https://sodocumentation.net/julia-lang/topic/5564/-goto-and-...




I guess that depends on if the language supports tail recursion and/or you're 100% sure it won't blow the stack. If you need to retry forever, without using any memory to do so, goto is perfect.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: