Go: When To Use Generics

Let’s start with a general guideline for programming Go: write Go programs by writing code, not by defining types.

This is utterly horrifying and is one of the worst things about the whole go model.

Programs are something that translate data from one format to another, generally by a whole series of transformations internally. Not thinking about your data model from the beginning is horrifying. Types should come first, so you know that it is in a good format at every step. Then and only then do you write transformations (functions) between them.

2 Likes