Skip to content

Comment on Go: building on the shoulders of giants and stepping on a few toes [video]parent

Comments

You can also write it Go style if you prefer; we started off with exactly that, then moved to a macro, then turned that macro into ?.

Interesting. Does the Rust book (you wrote), explain the difference between the Go style and the current Rust style, and explain how to use the Rust style (well)?

Asking because I've found this Some / None stuff (also there in other languages like F#) a little tricky to understand (although I have not spent a lot of time on it yet).

We talk about it a little, but the best resource on this topic by far is https://blog.burntsushi.net/rust-error-handling/ which works the whole way from first principles. It was in the first edition of the book but due to space requirements didn’t really fit in the second edition.

Thanks, will check that blog out.

No problem! In general, burntsushi’s work is some of the best in Rust. He’s also very fluent in Go.

Good to know, will check out his stuff in both languages, thanks.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.