Comment by std_throwaway

8 years ago

But what else do you switch to?

Imagine you import tons of modules which often are only available in Python. This gets you going really quickly with your project and it runs very smoothly. Transferring this to C++ would probably take so long you won't even finish to find out before you run out of funding.

I have hopes that Rust or some descendant of Rust will get us there in maybe 10 years but in the meantime it would be better to get Python up to speed as good as possible.

If Python had a 10th of the funding JS has, we would have start up time, packaging, gui and mobile apps solved by now.

For some use cases, Go might be a good alternative to Python. It's performant, yet simple and readable and it has a great ecosystem.

  • I find laying out a go project with dependencies to be miserable though. I write a lot of go and python code and why on God’s green earth did google decide to handle dependencies by having you effectively git clone a library and then have these huge tree deps subdirectories and so on I don’t know. It’s mess. I vastly prefer the approach of either having one canonically designated folder to install dependencies to where each dependency is a top level directory that can be scanned or having them all stored in a project folder relative to root of the workspace similar to node_modules then the current mess.

    Drives me nuts. Look at this layout if you don’t know what I’m referencing:

    https://golang.org/doc/code.html#remote

    Yes I have used dep

    And yes I have all kinds of shortcut commands for navigating my Go workspace

    But look at this canonical example From the docs and it’s easy to see this is a giant mess that is utterly unnecessary. No other language I’ve used has had such a gross problem with dependency layout. It also leads to gross import strings.

    It’s one of my biggest criticisms of Go to be honest.

    Thst and it’s reliance on environmental variables that have to be set perfectly in order to actually do anything (thank god for direnv https://direnv.net/)

    • Isn't what a dependency folder like node_modules pretty much what the vendor folder is to go. Have you tried using a dep mangement tool like glide before?

      2 replies →

  • Personally I found Go almost uniquely UNsuited to Python-style explorative programming. The lack of generics, and the high-ceremony error handling are pretty much 180 degrees from python.

    While of course it doesn't have backing from a giant multi-nation, I think Nim (https://nim-lang.org/) is a much better fit for "python, but fast".

  • Only if you are an experienced programmer. But a lot of great python tools are created by mathematicians, geographers, biologists, students, sys admins, etc.

    • I agree, but in this case I meant especially command line tools, such as mercurial. Of course, for scripting experiments etc. Python is the better choice, but these applications are normally not too worried about startup time.

  • Do we have numpy, matplotlib, scipy, pickle etc. for Go?

    • Do the build processes mentioned in this email make heavy use of numpy, matplotlib, scipy, pickle, etc.?

      NumPy is very exciting and all, but it's a subcommunity of the Python community, not 90% of its usage. NumPy users are probably not, in general, trying to spawn twenty five thousand processes in sequence to accomplish some task. The people who are complaining about fractions of a millisecond of startup time are not inverting massive matrices.

      4 replies →