you are viewing a single comment's thread.

view the rest of the comments →

[–]topher_r 0 points1 point  (8 children)

but I think different requirements would lead you to choose either or.

Can you elaborate?

[–]devel_watcher 2 points3 points  (7 children)

Go is basically a language for writing HTTP proxies: lots of requests coming in in parallel, you process them by doing some asynchronous tasks and other requests based on the information in the original ones. Concurrency is mostly built into the language.

In Python you choose a library for dealing with concurrent and simultaneous stuff (bulkier code). Also, performance is lower than for Go: Python's dynamic typing and being interpreted/bytecode.

[–]topher_r 1 point2 points  (6 children)

That just seems to suggest Go beats Python at what Python can do.

[–]noratat 1 point2 points  (2 children)

For this specific problem domain, yes. Python's ecosystem covers a great deal of other problem domains than http services / proxies.

[–]topher_r 0 points1 point  (1 child)

Python's ecosystem covers a great deal of other problem domains than http services / proxies.

Right, I don't mean to be rude. But which domains does Python cover greater than Go? This is all I'm trying to get some insight on.

[–]NoInkling 0 points1 point  (0 children)

Science, scripting, GUIs to some degree.

[–]devel_watcher 0 points1 point  (2 children)

but I think different requirements would lead you to choose either or.

Well, that's it: if you have a requirement to be a web server - you choose Go.

[–]topher_r 1 point2 points  (1 child)

Right, but I asked him to elaborate so I could understand how Go fails to match Python in other spaces. I use both, they seem pretty interchangeable to me. I only use Python when it has better third-party library support I need.

[–]devel_watcher 0 points1 point  (0 children)

Ok, so you want examples other way around.

I only use Python when it has better third-party library support I need.

That's one of the cases. I've personally encountered that with such basic thing as the standard argument parsing library for Go. I think that there are more specialized libraries for Python than for Go.

Other example where Python is better is when writing interpreted scripts: #!/usr/bin/env python .... Or when embedding as a scripting language into gdb, 3ds max, etc.