Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> That’s like expecting a local function to continue executing after a `return` statement.

Well... they can![1]

It's definitely a thing in traditional always-running web server processes, which is all people know these days.

Many developers have never written a code for a short-lived process outside of maybe school exercises. Things like CLI tools, background jobs, etc...

[1] I get "Later!" printed out... most of the time: https://dotnetfiddle.net/ng93d4



Also, `defer` in go or `finally` in JS/Python




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

Search: