Internals

The Getting started section of this repository defined generics as a pattern that:

  • is friendly to developers writing code (take multiple types)
  • provides compile-time type safety
  • provides runtime type safety

With that in mind, this section explores how generics are implemented in Go by comparing it to Java and .NET. However:

  • readers can draw their own conclusions regarding the developer-friendliness of generics in Go versus other languages
  • and all of the aforementioned languages, including Go, provide compile-time type safety with generics

This section focus on compiled code:


Next: Type erasure