|
|
|
|
|
by rogpeppe1
4166 days ago
|
|
> Go would have a reasonable compile-time type system, except that without
> generics you end up having to cast a lot, which renders your compile-time
> type system almost irrelevant. In my experience of Go, this is not actually true.
For example, in the latest project I've been working on, there
are 8487 lines of non-test code. In that code, there are
a total of 16 dynamic casts, more than half of which are checked
(mostly checking for particular error types). There are
a total of 4 occurrences which might possibly be amenable to generics. The type system is totally relevant, and checks 99.9% of our code. |
|