Most likely you will use more than one programming language through your career. There's no single "best" programming language, each one has its own use cases, and languages are popular or unpopular for some reasons. Here's my summary:
- C/C++ are lower level languages, sometime called system languages, they are best for operating systems, drivers, game engines, machine learning algorithm implementations, or wherever performance is critical. However you need to take care of more low level details, like memory management, so it is error prone. Newer languages like Go or Rust are trying to make it simpler for the programmer while achieving similar speed as C/C++.
- Java is both wildly loved and hated. It is very popular in enterprises and also in mobile development, since it is the default language in Android. Kotlin is challenging Java as another officially supported Android language. Scala's popularity is mostly because of Apache Spark. Groovy is seen in Gradle, the build tool of Android. Closure is another JVM language that you may have heard of.
- Python is a versatile and beginner friendly language. The Python 2 to Python 3 migration took too long, and it somehow hurt the adoption and its popularity, but finally Python 2 will be deprecated in 2020. Now Python is quickly gaining popularity due to the uprising of machine learning, or "data science". It is used in tools like numpy, pandas, Tensorflow, Pytorch/Caffe2, etc. It is competing with R in this area, however Python is also popular in other areas, like Django for web development, or scripts for automation.
- The majority of the websites are powered by PHP. But don't be fooled. It is because WordPress is so popular for blogging, e-commerce, and content management, so smaller/long tail websites use it to skip the coding. PHP 7 got a big upgrade from PHP 5.x, but still I'm not convinced to invest my time in this language. Hack/HHVM is Facebook's version of PHP, but after PHP 5 is deprecated, HHVM would stop supporting PHP, and the two languages will diverge. Though open sourced, outside of Facebook, Hack's adoption is quite limited.
- SQL is not the easiest language to write queries in many cases, however it is so widely used and supported, that's why in Hadoop system, Pig is dying but Hive and its successors/replacements are thriving, like Presto or SparkSQL. It is used in both online databases and data warehouses. SQL has its standards like SQL:2016, but no two engines are the same, each will implement a portion of the standard, and add some of its own features.
- Some languages are fading away, do not waste too much time unless you have to. Object-C is being replaced by Swift; companies are moving away from Ruby once they pass the proof of concept phase; C# and other .NET languages are only used in Windows, and Microsoft is embracing open source; forget about Perl.
If you disagree with my assessment, here are some places to check the popularity rankings of the programming languages. None is 100% accurate though.
- TIOBE: update monthly, based on the number of web pages.
- PYPL: update monthly, number of searches for tutorial of each programming language.
- RedMonk: update twice a year, based on GitHub and StackOverflow
- Github's stats: Octoverse
- Google Trends.
- Githut: https://madnight.github.io/githut
- StackOverflow Survey: https://insights.stackoverflow.com/survey/2018#technology
Lua - a powerful, lightweight and embeddable scripting language that’s incredibly fast. All Lua actions start from C code in the host program calling a function from the Lua library.
Lua is good for
- run inside nginx
- in Redis
- in games