How does Go statically type check collections, then? It seems like a pretty common, desirable use-case to me.
I could understand not missing this if you're coming from a dynamically typed environment, but understand that many people aren't.
I could understand not missing this if you're coming from a dynamically typed environment, but understand that many people aren't.
void do_stuff(Integer[] integers) {
....
}
do_stuff(new String[]{"1", "2", "3"})
Compiler: whoops, you passed an array of strings when the API called for an array of integers.