I'm talking about really learning the language. Not just doing some quick side project.
What would you choose? The deciding factors for me are: being future proof so my knowledge could be used in the next 5 years, cross platform, and has a solid, consistent standard lib. I'm looking for a "can do several things with it" language that can also help me to be a better developer (by exposing me to new stuff). I might use it for scripting or cli tooling but (ba)sh and powershell served me well so far.
I'm not considering mobile since I'm tired of Java and I have no desire to use the Apple ecosystem. But of course that it would be a plus.
I was also considering C# (is there a TL;DR? so many keywords and revisions that I already lost any desire to learn it) but Microsoft worries me. My tools and workflows are Linux based.
Python being slow worries me and maybe most of my effort would be spent in learning to produce pythonic code instead of learning deeper concepts.
1. Python is definitely future proof. It is most likely going to be THE language in the near future. Machine learning and AI is most likely where most new breakthroughs will happen, and Python is well positioned to leverage this. Read more here http://blog.hackerrank.com/emerging-languages-still-overshad...
2. Python has a good standard library. It has been around for a while now, so it also has a huge number of high quality third party libraries.
3. Python is slow and this is a serious disadvantage. However writing Pythonic code is an aspect of Python that I absolutely love. I think Guido's guiding principle "code is read more often than it is written" is quite true and writing beautiful code is a thing worth learning. Other people will love you for it.
Eh yes, and no. I don't wish to argue, because out-of-the-box, it's an interpreted language with a global lock, and it most definitely is slower than most compiled languages. Sometimes orders of magnitude so. On the other hand, computers are damn fast, the developer productivity gains of writing Python are huge, and there is a flip side, especially for somebody who wants to "really learn the language."
Within the CPython ecosystem, there are tons of well-established 3rd party libraries that take advantage of the speed of C, without your code ever needing to know. Take for example numpy/pandas or asyncio with uvloop. A step up from that, there's Cython, which is surprisingly robust and easy to use. It also makes interfacing with C code rather simple, and thus provides an avenue for optimizing speed-critical code paths without needing to know CPython internals to do so.
Outside of using CPython, there's the well-established PyPy, and the up-and-coming Pyston.
My point is, if you need a faster Python, with perhaps a little bit of effort it's out there.
Wanna build a web app? Wanna dabble in Datascience? Oh you wanna do Machine Learning? How about a desktop app? Game? Yep Some powerful scripting?
Just so easy to get productive.
- If you want to get sh!t done, and quickly, go for Python. It's really easy to build things from scratch with Python because of how concise, clean, and clear the language is. Plus, the Python community is huge so there's practically a package for any advanced functionality you need (and it's easy to write one yourself). There's a reason why research giants such as Google, NASA, and the LIGO project use Python -- it's because you get to spend less time getting your code to work and more time actually designing the underlying models. TL;DR: Write and ship code faster, at the cost of actual runtime performance (but PyPy and Python 3.x with asyncio, makes Python more competitive in performance as well).
- If performance is your focus, go for Go. It's a lot stricter than Python because it's a compiled language and therefore you'll get a lot more compile-time errors with regards to variable typing and conventions (reminiscent to, but arguably even stricter than, C++ and Java). On the upside, you'll undoubtedly incur less technical debt, at the cost of spending a lot of time cleaning your code and getting it to work. Go is pretty young, but it's gaining a lot of traction (spawning the likes of Hugo, Docker, and Kubernetes), so if you need your program to be more performant and highly concurrent, go for Go. TL;DR: Spend more time writing code, in exchange for your program being easily concurrent and performant.
Personally, unless I'm writing OS-level programs that require fine-tuning of things such as memory management, I'd go for Python. Some of Go practices and conventions got tedious and old pretty fast.
Python has a great standard lib which is mature, and not changing a huge amount. It also has a lot of modules that you can pip install.
If you are really worried about performance, you can pick Go, although you might as well just do C++ if you're super hardcore about performance. While the garbage collector has gotten a lot better, it's still a perf hit.
That being said, for most of the code I write, it's only slow in python if I'm doing something stupid. The threading and pool primitives are also very useful.
For simple web services, there are also a number of mature python frameworks (flask, django) that have more features than some of the basic go http server stuff.
It's also a fair bit faster to bootstrap simple CLI programs with python. Argparse is also great.
What type of programming do you want to do? I don't think I would recommend Go for game development or embedded systems (though people do it).
More than becoming an expert in a given language or stack, another thing to consider is learning a domain. I'm partial to distributed systems, but if image or audio processing, or desktop app, or whatever it is what you find interesting, diving into those will keep you from getting stale and make you more marketable if and when you decide to move to a new employer. The tech stack will reveal itself or you will find that it is fungeable. The key for the resume there will be personal projects, meet up talks, and blog posts as opposed to work experience. At my work, we would be very interested in talking to such a person interested in distributed systems.
Whichever you pick, I hope you find fun.
I was surprised that all of the Elixir hype seems to have died here.
I totally understand not wanting to dive into something like Haskell though. Between Go and Python, I personally would choose Go for a long term commitment. I think the language is simple yet beautiful, has a robust standard library, and performs really well.
Python can be learned super quickly though, and being able to whip up a script is useful (you can 'import' seemingly anything). I'd say it's worth sprinkling in a little Python on the side.
I would recommend to take a look at Typescript and Swift.
Typescript is a better JS and Swift runs on Linux too.
If I'd been more interested in "Big Data", then Python (or, if I wanted to stay in the JVM world, Scala) would have been my choice.
Either way, Python and Go will be around for many years to come.