Re:On Apple's Love Affair with Swift
by zoul on Sunday August 12, 2018 @02:05AM
(#17743149)
For me, the big deal about generics is that they allow the type system to cover a much bigger part of my design. Without generics, any parametrized API will erase your types and then the compiler is blind. With generics the type information is preserved and when I specify a parameter type, somewhere several API layers away a type is suddenly fixed, too. That gives me a warm feeling (and code completion, too). And since expressive static type systems seem to be the right way to go, allowing the type system better insight into your code is a big win.
[ Parent
| on HN ]
There are no comments on this comment yet.