News for hackers. Stuff that matters.
Re:Learning Go by porting a medium-sized web back end from P... by boomlinde on Thursday November 09, 2017 @10:09AM (#15663002)
Another way to look at it is that Go expresses additional things that you can't express with Python.
Re:Learning Go by porting a medium-sized web back end from P... by erik_seaberg on Thursday November 09, 2017 @02:03PM (#15664919)
In Go it's impossible to make for...range support user-defined types, and you have to write out every loop the hard way (and rewrite any loop that was using a builtin type). In Python you just define __iter__. That's what's meant by expressive, you can write what you mean instead of having to explain yet again how it should be implemented.
Re:Learning Go by porting a medium-sized web back end from P... by boomlinde on Friday November 10, 2017 @04:07AM (#15668779)
Of course they're different on that level of detail. In go, if you want programmable iteration behavior, you would create a channel that is fed values by a coroutine. Then you can range over it. It's not a new type, but that distinction seems a bit picky.

What I am talking about is the static type system. You can't express that in Python, despite how much more convenient some of its features are.