Advantages of generics

Two advantages:

In Golang you can restrict the types usable for a generic with type contraints too.

Flow Control

Returning early in a function for specific conditions is preferred over adding the condition to an if statement because it quickly moves that use case out of the way, so we have more room to focus on the rest of the use cases.

Error Handling Goals

Software Priority