Similar ish but equally cool is Nim's `result` keyword for functions. https://nim-by-example.github.io/variables/result/
Also damn Nim needs to do a much better job with their docs and site. `nim result` returns this very outdated third-party link first and nothing else official.