Re:Why Tech Startups Should Look at Go
by copsarebastards on Friday January 16, 2015 @08:47AM
(#8898830)
How do you deal with container-type classes? The only way I can see to do this without casts is to duplicate the same container class for each contained type, which is fraught with its own problems.
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.