Hacker News new | ask | show | jobs
by Aeolos 540 days ago
I prefer this style for languages that have either a GC or scoped resource management (eg RAII).

However, I think the single exit point holds merit for C, where an early return can easily and silently cause a resource leak. (Unless you use compiler-specific extensions, or enforce rust-style resource ownership, which is really hard without compiler support.)