3 ms·
> Conciseness [...] you're very rarely having to use type hints all over the place This hasn't been my experience. When I tried porting some Python code to Go,
by pansa2 6y ago
> Conciseness [...] you're very rarely having to use type hints all over the place
This hasn't been my experience. When I tried porting some Python code to Go, I found it wouldn't compile without lots of type casts (mostly between different integer sizes and signedness).
- empath75 6y agoyeah, but python isn't statically typed. I'm comparing it to java.
- cultus 6y agoIt really shouldn't need any type annotations. A Hindley-Milner type system would have been more flexible and require no type annotations (as well as far less interface {} and unsafe casts), and still support everything Go has. The language as a whole seems to just commit all of the mistakes of C, except with garbage collection.
- pnelson 6y agoMy experience moving to Go from languages like Python and Ruby required a significant mind shift. I couldn't port my solution - I had to revisit the problem from the perspective of a Go programmer.
- minkzilla 6y agoI think that is because you’re coming from a weak typed language to a strong typed one. I’d from the outset you have to have your types match you wouldn’t end up with so many types.