3 ms·
It was commonly stated (or claimed) that they didn't know how to add generics without sacrificing both compilation time and runtime performance [1]. To my knowl
by lifthrasiir 5y ago
It was commonly stated (or claimed) that they didn't know how to add generics without sacrificing both compilation time and runtime performance [1]. To my knowledge they ultimately didn't choose a particular implementation strategy and instead chose a design that allows multiple strategies as needed.
[1] https://research.swtch.com/generic https://research.swtch.com/generic
- wwarner 5y agoIt also seemed like the original intent was to support generics and metaprogramming through code generation and AST manipulation, the argument being that code generation and AST manipulation are the most general way to build complexity and specialization from a simple set of primitives. I personally don't think that generics and generation are mutually exclusive, but if they were, I'd side with retaining simplicity over the new feature.