Hacker News new | ask | show | jobs
by Izkata 1339 days ago
Cargo-culting from C where you have explicit malloc() and free(). Best practice was to have only 1 return to ensure free() was always called on everything just before the return, so you wouldn't have a memory leak if one was missing from an early return.
1 comments

I was wondering where this 1 return practice originated from, but yeah, it makes sense in that context.