Hacker News new | ask | show | jobs
by gitgud 2889 days ago
Cool concept! Looks much more readable in this context:

    err = checkErr()
    if (err)
        return err
Vs

    returnif checkErr()
However, seems a bit overboard to add a reserved keyword for this 'exceptional' case.
1 comments

Thank you! Definitely a bit overboard.

`returnif` is fun, but there's certainly value in the simplicity of restricted, opinionated syntax (e.g Go).