[Python-Dev] Keeping competitive with Go (was Re: Computed Goto dispatch for Python 2)

Donald Stufft donald at stufft.io
Fri May 29 14:50:15 CEST 2015

On May 29, 2015 at 2:58:28 AM, Nick Coghlan (ncoghlan at gmail.com) wrote:
> On 29 May 2015 9:48 am, "Donald Stufft" wrote:
> >
> >
> >
> > On May 28, 2015 at 7:40:26 PM, Nick Coghlan (ncoghlan at gmail.com) wrote:
> > > >
> > > > One thing I've seen more than once is that new development happens
> > > in Python
> > > > until the problem is understood, then the code is ported to Go.
> > > Python's
> > > > short path from idea to working code, along with its ability
> > > to quickly morph
> > > > as requirements and understanding changes, its batteries
> > > included philosophy,
> > > > and its "fits-your-brain" consistency are its biggest strengths!
> > >
> > >
> > > Right, Go is displacing C/C++ in that regard (moreso than Python
> > > itself), and now that Rust has hit 1.0, I expect we'll see it becoming
> > > another contender for this task. Rust's big advantage over Go
> > > in that regard is being compatible with the C/C++ ecosystem,
> > > including Python's cffi.
> > >
> >
> > I’m not sure if I’m reading this right or not, but just to be clear, I’ve
> > seen a number of people express the sentiment that they are switching from
> > Python to Go and that the deployment story is one of the reasons. It’s not
> > just people switching from C/C++.
> C and C++ used to be the main "second version" languages used to create
> statically linked standalone binaries after an initial prototype in Python.
> Folks that learned Python first understandably weren't keen on that idea,
> so they tended to either use Cython (or its predecessor, Pyrex), or else
> not bother doing it at all until first Go and now Rust came along (for
> reasons unknown to me, D appears to have never gained any popularity
> outside the ACM crowd).
> If I seem blase about Go, that's the main reason why - the benefits it
> offers aren't novel from the point of view of C/C++ programmers, they're
> just now available without having to put up with arcane syntax, manual
> memory management, an unmaintainable threading model, relatively poor
> support for text manipulation, etc, etc.

I don't think Go is going to "kill" Python or anything, but I do think that
not taking a look at other languages and why people are picking them over
Python is important, otherwise we will end up dying (and would deserve to)
because we'd be like the big company that didn't bother to keep up with the
times and just assumed we'd be big forever. I talk to a lot of people about
the distribution story of Python applications, what works and what doesn't.
A very large majority of the people who have used both Go and Python in a
serious capacity have indicated that they've at least considered writing new
things in Go instead of Python due to the fact that distributing it is much
easier and a not insignificant number of them have in fact started to switch
to using Go in situations where they are trying to distribute things to
disparate boxes.

This might be something that people could have done before with C/C++ but with
a nicer language behind it... but that's kind of the point? You don't need to
be stuck with a terrible language to get a nice single file executable anymore,
you can get that and use a good language at the same time which makes it a lot
more compelling to a lot more people than having to be stuck with C.

Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

More information about the Python-Dev mailing list