DSA Studio
Search
Home
Sign in
Go Generics Checkpoint
Type sets, underlying types, and practical generic API design.
1. Which constraint allows named type aliases with same underlying type to match?
T int
~int
constraints.Integer
any
2. Why use a pair of parameters like `func F[S ~[]T, T any](...)`?
To force boxing of values
To preserve custom slice alias return types
To avoid compiler inlining
To disable type inference
3. Name one practical trade-off when using generics in low-level code.
Submit quiz
Auto-advance on pass
Join Discord
×