Generics: GCShape Stenciling and What Go Actually Does
Inspect generic shapes and dictionaries and measure the actual operations that survive compilation.
This chapter is part of the paid launch. The preview stays visible so readers can evaluate the exact scope before buying.
Core and Complete. Complete also includes the practical exam and free Go-version updates.
What this chapter teaches
Generics are zero-cost, like C++ templates — the compiler stamps out a specialized copy for every type, so there's never overhead.
Go emits implementations by shape and supplies dictionaries with type-specific information. Different types can share code when their shapes and required operations permit it. Dictionaries also exist for value-shaped instantiations; runtime cost depends on wrappers, inlining, and whether the body uses dictionary entries.
Unlock Chapter 10 and the rest of the course.
Core unlocks every paid chapter and lab. Complete also includes the practical exam and future Go-version updates.
Full course access with the complete mechanics curriculum.
Best-value launch option with the exam and free Go-version course updates.
No subscription or account required. Access is tied to the email entered at Stripe Checkout and can be restored by email.