4 ms·
> Generics are convenient but they come at a cost in complexity in the type system and run-time. By run-time they mean compile-time? There shouldn't be a run-t
by potamic 1mo ago
> Generics are convenient but they come at a cost in complexity in the type system and run-time.
By run-time they mean compile-time? There shouldn't be a run-time penalty right?
Also, is there some measure of the additional compilation cost now that generics has been added?
- neild 1mo agoThe “runtime” as in the compiler runtime which provides the scheduler, garbage collector, etc.
- dolmen 1mo agoThe runtime also includes reflection, so preserving compatibility of the type system while adding generics was definitely a challenge, so adding generics to Go was definitely a great achievement.