Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I love Python because you can just do

    foo = "bar"
and be done with it. The interpreter knows it's a string variable. But I don't really care about runtime dynamic typing - I can't wait for Go to get parametric polymorphism, interfaces and runtime type dispatching can be quite clumsy. I would be perfectly fine with typed function arguments in a Pythonic language and being able to only call functions that fit the variable type (which is what I end up doing anyway with typehints and mypy).

I think Go made a right decision there - they kept the static typing but added a walrus := operator for automatic type inference. Every function has a type signature so the type inference algorithm is pretty trivial, and the language still feels like Python:

    result, err := FunctionThatMayFail()


Basic type inference has been around for decades, Go isn’t responsible for it. Haskell, scala, etc had it for a long time.


>Basic type inference has been around for decades, Go isn’t responsible for it.

I never said it was.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: