Comment

Comment by manlobster

> Here's one of them, which follows a common recommendation in the Go community to use a sentinel error to represent the "value not found" condition.

Is this really a common recommendation in the Go community? Seems like returning `bool` to indicate if the value was found is somewhat of a no-brainer, since it follows the familiar approach used for map lookups and type assertions.

parent manlobster 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton