Go: When To Use Generics

A new Go blog post/announcement has been posted!

Get the full details here: When To Use Generics - The Go Programming Language

1 Like

Corresponding tweet for this thread:

Share link for this tweet.

1 Like

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