paint-brush
Fixing the Billion Dollar Mistake in Go by Borrowing from Rustby@nickparsons
5,388 reads
5,388 reads

Fixing the Billion Dollar Mistake in Go by Borrowing from Rust

by Nick Parsons6mJune 14th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

If you ever used Go, you probably saw this error at least once. Somewhere a nil pointer or nil interface was passed to a function that doesn’t handle nil. In all cases this is a programming error, either the function should handle nil or the caller shouldn’t have passed nil to the function. This <a href="https://github.com/golang/go/wiki/ExperienceReports" target="_blank">Go experience report</a> will try to make the case that nil is often not needed and being forced to have nil-able pointers and interfaces can cause panics in production. We’ll also briefly discuss how Rust solves this issue and how their solution could be applied to Go.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Fixing the Billion Dollar Mistake in Go by Borrowing from Rust
Nick Parsons HackerNoon profile picture
Nick Parsons

Nick Parsons

@nickparsons

Director of Developer Marketing @ GetStream.io

Learn More
LEARN MORE ABOUT @NICKPARSONS'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Nick Parsons HackerNoon profile picture
Nick Parsons@nickparsons
Director of Developer Marketing @ GetStream.io

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite