1. The ability to dump large amounts of untyped data on your app and pull out only what you need. I get back a JSON response from backends with hundreds of fields. In Python I can just parse it into a dict of arrays and pull out only what I need. In Go I have two options: parse into a map[string]interface{} and then use a whole lot of type assertions when I want to actually manipulate the values, or parse into a user-defined data type that pulls out the fields I need. I've opted for the latter, but since the JSON data structure is nested about 6 levels deep, that's a lot of types I have to define before I can do anything.
2. List comprehensions. So much of prototyping is basically "Munge this data type and compute something. No, actually, munge this whole list of data types and compute a list of somethings." That's a one-liner in Python, about 4-5 lines in Go. It adds up.
3. Awkward append syntax. For such a common operation, it's awfully verbose (and confusing, until you get used to it and understand why you need to reassign the result back to the slice you're appending to).
4. Error handling. In prototyping you usually just want to ignore errors on the first pass through and print a traceback. Go explicitly discourages this and makes you check the return value. And you can't even write a type-safe utility function that takes a function that returns (result, err) and panics if err is non-nil, because of the lack of generics. (The return type of such a function would depend upon the function that's passed into it, which you can't express statically.)
5. Pass-by-value defaults. In Go structs are value objects, which mean they're copied when passed to functions or assigned to variables. This is a reasonable design choice, but means that you need to think about whether you want a value or a pointer before writing the code. And if you screw up or forget to change it, your local modifications to the object are silently ignored. When I'm prototyping, my attention is usually on the problem domain and not on the language, and there've been several times I've messed up because a function suddenly needs to start modifying its argument but it was passed in by value and I forgot to change it.
To be clear, I like Go a lot as a production language, and I wish that the large C++/Java systems I maintain were written in it. But it doesn't really come close to Python for prototyping in my experience. I'm a little surprised after hearing many glowing testimonials about how Go is just as productive as Python and just as fast as C++; I would still say there's at least a factor of 2 difference in productivity. I see Go as the new Java (and also the anti-Java, in terms of design decisions they made). It's simple enough to learn quickly, it's "good enough" in performance to be used in production systems, and its design tries to encourage unskilled programmers to not screw things up too badly. On all these counts I think it's strictly better than Java. But I feel like for people that are willing to use a multi-language solution, Python + C(++) is strictly better for most of the various types of programming you'll face in building a large system. Python beats Go for scripting, Python beats Go for prototyping, Python beats Go as a config language, C++ beats Go for high-performance computing, and C++ beats Go if you need to be close to the machine. And with Cap'n Proto one of the slowest and most annoying parts of maintaining a large multi-language system (re-marshaling your data structures across the memory boundary) goes away.
What I'd really love is a way to use Python as a prototyping/scripting language and Go (instead of C or C++) as the underlying production substrate, but their runtimes are pretty incompatible.
For writing apps for the server, where it will keep running 24/7 serving thousands of people, I think I'm okay with giving up what you estimate to be about a factor of two in productivity for the performance gain, but I wouldn't give up the order of magnitude productivity difference needed for C++ to gain another factor of two in performance (vs Go) unless my code had to serve millions. I don't see that happening anytime soon, so Go as the new, improved Java (I see it that way, too) still seems like the sweet spot for server coding for me.
Since I started writing Scala I got used to immutable data and the reverse happens to me when coding in imperative style in other langs; that I pass something and it gets "locally modified" feels awkward. Preposterous even.
Regarding Go and the "also the anti-Java" part: I really don't think so.
They have made some decisions that seem to me a reaction to c++ and that at least is similar to Java. Some of them seem simplistic not simple: for example "There is no inheritance!" (one one one) but I really don't know how implicit structural subtyping will work out in the long run.
What I really envy from Go is the "compile and link to one executable" from an ops point of view.
Time will tell.
[Edited to add envy part, and rewrite a phrase]
I don't understand "yet passing an object by value is only one character off from passing it by reference".
Is that Go?
If you need high performance servers,move to the JVM(Scala) or Go,or use a C++ framework , problem solved. Use the right tool for the job.Disqus did and it works pretty well for them , without having to reinvent the wheel.
The rest could all be done incrementally, replacing components as necessary to gain performance wins. Templates seem like a good candidate because they're used everywhere and would be on the fast path even for C++ code. You'd have to convert all the tags over to get any useful speedup. But you could leave filters in Python and call into them via Python runtime, then convert them over incrementally.
I'd do middleware next as that runs on almost all requests. Again, you can do it incrementally: all you need to do on the first pass is a C++ dispatch layer that reads the classes from settings.py and invokes them through the Python interpreter. Change that to let you register & define C++ classes implementing the interface, and you can transition the most common middleware classes one by one to C++.
A bunch of stuff I'd expect would never move over to C++. There's no real reason to port django-admin/manage.py, or the admin site. I personally wouldn't care about moving the ORM over; if I want performance I don't use an ORM, and there's nothing wrong with using raw MySQL or libpq calls. A lot of the niche stuff like File Uploads or PDF generation occurs infrequently enough that there's really not much benefit to porting it over. It's debatable whether even Forms is worth including, since most high-traffic pages would not be ones where you're submitting a rich form.
This would basically be a high-performance HTTP server coupled with an embedded Python interpreter. Instead of running Django in Python, it would take your app's settings.py and url.py and compile the URLs you have into a DFA, using a high-performance regexp implementation like re2. When a pattern matches, you could either register your handlers in Python or in C++. Python handlers would work like Django normally does: they invoke a Python function, pass in request/response objects (constructed quickly via a C++ native HTTP parser), and write the response back to the socket. C++ handlers would invoke a C++ class to do the processing, which would use native C++ DB bindings or RPC stubs. C++ code should be able to call into the Python code via the normal interpreter mechanisms, so you can share utility functions between them. (Vice versa as well, though writing Python bindings for C++ utilities might be a bit more of a chore.)
The templating language could also be redone to parse the templates on server reload, generate bytecode, and then read directly from C++ data structures or Python wrappers around those. Then rendering the template becomes a very quick linear pass over the bytecode, either outputting to a buffer or directly doing zero-copy vectored IO to the socket.
The cool thing about this (other than the extra speed from using good algorithms and writing the framework in a fast language) is that you could incrementally transition from a productivity-focused startup webapp to a performance-focused high-growth webapp. You don't need to write everything in C++; only the most frequently trafficked dynamic pages. Oftentimes webapps have very sharp hotspots, eg. I'm guessing that the front page of HN gets many times more pageviews than /new, /leaders, or /reply. If they're static you can cache them, but oftentimes the heavily-trafficked pages are heavily trafficked because they change frequently.
The other cool thing is that it preserves a built-in framework for prototyping and experimentation that can re-use functionality you've built for the production site. Usually the experimentation process doesn't stop when a company grows up: it's really important to provide an escape hatch for folks to try new ideas without having to rewrite everything you've built over time.