Which programming language should I start with?

Which programming language should I start with?

Photo by Wes Hicks on Unsplash

This question came to my mind so many times when I was about to learn my first programming language. And understanding the basic concepts of your first language and building a solid foundation is very important because they will be used in some other programming language also. So that's why I'm writing this blog for all the folks who want to start with their first programming language. Let's jump straight in!

IMPORTANT NOTE: There is no such thing as 'Best programming language in the world'. Every programming language has its own importance and uses. So, I would strongly recommend you to focus more on the concepts rather than memorizing the syntax.

For a beginner, I will recommend C++.

Now the question arises WHY C++?

Let’s have a look at the Hello World program of the three popular languages that are taught to beginners.

Python

print('Hello World')

C++

#include <iostream>  
int main() {      
    std::cout << "Hello World";      
    return 0;  
}

Java

public class Hello {      
    public static void main(String args[]){      
        System.out.println("Hello World");      
    } 
}

Now let's have a close look at all of these, one by one.

Let’s start with Java, now for a beginner, it will be tough for you to understand the concepts of Classes and Objects initially. It will also be a bit tough for the instructor to make the student understand what exactly the keywords like static, void, main, public, System, etc, mean. So that’s why I don’t think that Java should be the first language.

Coming to Python, I didn’t choose Python because it’s too easy. So switching to a new language from Python can be a bit hectic for the student. And because Python’s code is very short in comparison to other languages, the beginner may become lazy while switching to a new language:P

So, I think C++ is the best language for beginners. It also has concepts like Pointers which many languages don’t have, so in C++, you will be able to work closely with memory. One question you might ask is Why I didn't consider C here? The answer is C is not object-oriented, while C++ is. And in the real world, most of the programs that you will write will be based on OOP. C++ is not very easy to learn and not too hard also. So, I think there will be a smooth balance for you when you switch to some other language in the future. Also, since C++ is very fast so this will also help you in programming contests held on sites like Codeforces, Codechef, etc.

So start with C++ and best of luck.

Happy Coding:)