Advanced
Go (Golang)
Q64 / 100
What is GC shape stenciling in Go generics?
Correct! Well done.
Incorrect.
The correct answer is B) Grouping types with the same GC shape (pointer/non-pointer) to share a single instantiation, reducing binary size
B
Correct Answer
Grouping types with the same GC shape (pointer/non-pointer) to share a single instantiation, reducing binary size
Explanation
Go 1.18 shares instantiations for types with the same underlying GC shape (e.g., all pointers share one instantiation). This differs from C++'s full specialization per type.
Progress
64/100