What is Best Computer Programming Language to Learn?

In summary: C is missing a lot of the features of modern languages, but it's kind of hard to appreciate why the modern features exist if you haven't worked in a language like C. After writing a few real applications in C you'll find yourself wishing that the compiler knew how to do things like allocating and deallocating memory automatically or protect you from putting arbitrary non-sense data into the memory of typed variables.And after writing a few applications in C++, you'll find yourself wishing that the compiler didn't know how to do things like creating constructors, copy constructors, and destructors and such, especially when you neglect to explicitly create them yourself.
  • #1
bballwaterboy
85
3
Is there a computer programming language that is the "best" and/or most transferable (in terms of making it easier to learn other languages down the line) for someone who is just getting started in this area?

I literally have zero programming experience as of the moment, but would like to get started learning a language next semester. Is there any particular one that is highly recommended (or even one to avoid)?

Thanks very much!
 
Technology news on Phys.org
  • #2
It depends on what type of programming you intend to do, and on what kind of computer system. There are many passionate advocates of one language or another, but IMO, there is no one "best" language. In fact, many, in not most, programmers know or use more than one programming language.

This question has been posed in one form or another on PF before. You can use the Search function of PF to find the older threads discussing this question.
 
  • Like
Likes phinds
  • #3
I assume that you are interested in general purpose languages and not special purpose languages. A lot of main-stream languages (C++, Java, C#) have inherited from C. C is a good basic language, but does not introduce you to object oriented concepts. A reasonable course would be to start with C and start adding some C++ when you are comfortable with C. The reason I recommend C++ is that C syntax works in C++, but not so much in Java or C#. After a while, you will know if you want to switch over to Java or C#. A great deal of C and C++ knowledge transfers to those languages.
 
  • #4
SteamKing beat me to it, on both counts ... no "best" language and "do a forum search"
 
  • #5
You don't even have to do a forum search. Just look at the "Similar Threads" list at the bottom of this page. There's one titled "What programing language should i learn?" Go to that thread, see if it has anything useful, then look at its "Similar Threads" list. Rinse and repeat.

My 2 cents: Either C++ or Java. Both have been used a lot in introductory college/university computer science courses (in the US, anyway), so there are a lot of textbooks, and a lot of instructors' course materials available on the Web.

For C++, this means you'll probably start with non-object-oriented programming using the C-like part of the language except probably for using iostreams instead of file pointers for input and output, and (hopefully) the standard C++ string data type instead of char* "strings" for text data. Then you'll learn about the fancy stuff like object-oriented programming, pointers, dynamic memory allocation, etc.
 
  • #6
I would probably learn C first.

C is missing a lot of the features of modern languages, but it's kind of hard to appreciate why the modern features exist if you haven't worked in a language like C. After writing a few real applications in C you'll find yourself wishing that the compiler knew how to do things like allocating and deallocating memory automatically or protect you from putting arbitrary non-sense data into the memory of typed variables.

Also, since C is fairly simple language it won't take as long to learn and will put you on a solid foundation for learning C++ or C# or Java.
 
  • Like
Likes AAAA and FactChecker
  • #7
DavidSnider said:
I would probably learn C first.

C is missing a lot of the features of modern languages, but it's kind of hard to appreciate why the modern features exist if you haven't worked in a language like C. After writing a few real applications in C you'll find yourself wishing that the compiler knew how to do things like allocating and deallocating memory automatically or protect you from putting arbitrary non-sense data into the memory of typed variables.
And after writing a few applications in C++, you'll find yourself wishing that the compiler didn't know how to do things like creating constructors, copy constructors, and destructors and such, especially when you neglect to explicitly create them yourself. About ten years ago I saw an internal Microsoft white paper giving reasons for implementing Windows kernel functionality in C versus C++. One of the main reasons given involved the greater complexity of the code produced by the C++ compiler, as well as the difficulty in predicting the size of the final object code, including the code added by the compiler for constructors, copy constructors, and destructors.

I'm not arguing for the superiority of one language over another, just saying that each one has its pros and cons. In any case, it's pretty difficult to get a pure C compiler these days. Most of the ones that I know about have a backend that accepts code written in C or C++.
DavidSnider said:
Also, since C is fairly simple language it won't take as long to learn and will put you on a solid foundation for learning C++ or C# or Java.
 
  • #8
Not sure what counts as 'pure', but GCC will accept flags like -std=c89 and -pedantic.
 
  • #9
DavidSnider said:
since C is fairly simple language it won't take as long to learn and will put you on a solid foundation for learning C++ or C# or Java.
Totally agree. No programmer's career was ever hurt by learning C.

The exception is for a person looking only for a special purpose language (MATLAB for Scientists/Engineers, SAS for statisticians, etc.)

P.S. I have looked at some comments in the other related threads and IMO we aren't doing anyone a favor by sending him down that rabbit hole.
 
  • #10
Learning the very first programming language = learning programming. I would even rephrase that: while learning the first language, the objective is not the language; it is programming. So keep your options open. Do not ever think that the first language you learn will be the one that you will use in your first gainful employment.
 
  • #11
SteamKing said:
It depends on what type of programming you intend to do, and on what kind of computer system.

Hi, SK

I didn't realize there were multiple kinds of programming. I'm curious now what are the different types? I figured there was just one basic type and that I'd try and learn a language that was very useful.

I own a PC and so would be interested in learning how to program for PCs.

FactChecker said:
I assume that you are interested in general purpose languages and not special purpose languages. A lot of main-stream languages (C++, Java, C#) have inherited from C. C is a good basic language, but does not introduce you to object oriented concepts. A reasonable course would be to start with C and start adding some C++ when you are comfortable with C. The reason I recommend C++ is that C syntax works in C++, but not so much in Java or C#. After a while, you will know if you want to switch over to Java or C#. A great deal of C and C++ knowledge transfers to those languages.

Hey, FC

So, you're the second person mentioning a distinction between types of languages. How do general purpose ones differ from special purpose ones? Any examples of the two types?

Your recommendation to start with C and then C++ sounds very logical, by the way. Sounds like it could be a good starter language and I'll research it a little before deciding. Thanks for the recommendation though!

By the way, how do you pronounce C#?
 
  • #12
bballwaterboy said:
Hi, SK

I didn't realize there were multiple kinds of programming. I'm curious now what are the different types? I figured there was just one basic type and that I'd try and learn a language that was very useful.

I own a PC and so would be interested in learning how to program for PCs.
Hey, FC

So, you're the second person mentioning a distinction between types of languages. How do general purpose ones differ from special purpose ones? Any examples of the two types?

Your recommendation to start with C and then C++ sounds very logical, by the way. Sounds like it could be a good starter language and I'll research it a little before deciding. Thanks for the recommendation though!

By the way, how do you pronounce C#?

Some programming languages are what they call "domain specific" meaning they were designed for a specific purpose in mind. You could think of HTML as a domain specific language for the markup of web pages. Or something like Matlab which was designed specifically for solving math problems.

A general purpose programming language won't be geared towards any particular domain but can be used across domains.

C# is pronounced See-Sharp.
 
  • #13
jtbell said:
You don't even have to do a forum search. Just look at the "Similar Threads" list at the bottom of this page. There's one titled "What programing language should i learn?" Go to that thread, see if it has anything useful, then look at its "Similar Threads" list. Rinse and repeat.

My 2 cents: Either C++ or Java. Both have been used a lot in introductory college/university computer science courses (in the US, anyway), so there are a lot of textbooks, and a lot of instructors' course materials available on the Web.

For C++, this means you'll probably start with non-object-oriented programming using the C-like part of the language except probably for using iostreams instead of file pointers for input and output, and (hopefully) the standard C++ string data type instead of char* "strings" for text data. Then you'll learn about the fancy stuff like object-oriented programming, pointers, dynamic memory allocation, etc.

Will do, jtbell. Thanks for the rec.

...Out of curiosity, why isn't there one super language that combines all the strengths of the others? If individual languages exist, why not just create a "super" language out of them all?
 
  • #14
bballwaterboy said:
...Out of curiosity, why isn't there one super language that combines all the strengths of the others? If individual languages exist, why not just create a "super" language out of them all?

Because strengths in one domain might be weaknesses in another. There are trade-offs.
 
  • #15
bballwaterboy said:
...Out of curiosity, why isn't there one super language that combines all the strengths of the others? If individual languages exist, why not just create a "super" language out of them all?
An example of a special purpose language is MATLAB for math and engineering. As a built in part of the language, you can make equations with a mixture of real numbers, vectors, and matrices. You can define vectors X = [ 1 2 3]; Y = [4 5 6] ;and write an equation A = 5*V + Y . It will calculate the vector A = [9 15 21]. Another specialized language is SAS for statistics analysis. An example is at this link: https://onlinecourses.science.psu.edu/stat480/node/9

These languages are specific for certain applications so they can make assumptions about what you want and mean in your programs. General purpose languages can't make those assumptions. That gives the specialized language a big advantage in their field, but they can't do other things easily. There isn't a reason to make a "super language" because people in one field only want to learn and use a language for that field.
 
  • #16
FactChecker said:
An example of a special purpose language is MATLAB for math and engineering. As a built in part of the language, you can make equations with a mixture of real numbers, vectors, and matrices. You can define vectors X = [ 1 2 3]; Y = [4 5 6] ;and write an equation A = 5*V + Y . It will calculate the vector A = [9 15 21]. Another specialized language is SAS for statistics analysis. An example is at this link: https://onlinecourses.science.psu.edu/stat480/node/9

These languages are specific for certain applications so they can make assumptions about what you want and mean in your programs. General purpose languages can't make those assumptions. That gives the specialized language a big advantage in their field, but they can't do other things easily. There isn't a reason to make a "super language" because people in one field only want to learn and use a language for that field.

Thanks again, FC.

Lastly, any recommendations for how/where to get started learning C? Books?...online?...etc.? I'm going to try to get a start over winter/Christmas break prior to next term.
 
  • #17
bballwaterboy said:
Hi, SK

I didn't realize there were multiple kinds of programming. I'm curious now what are the different types? I figured there was just one basic type and that I'd try and learn a language that was very useful.

I own a PC and so would be interested in learning how to program for PCs.

There are several major types of programming.

Games and other recreational diversions are usually heavily dependent on graphics to provide a realistic simulation of some type of competitive situation. Ancient text based games like Zork just won't cut it with modern gamers who prefer realistic simulations.

Scientific programming is oriented to making extended and complex numeric calculations with as much accuracy as possible. Often, a relatively small amount of input data can generate massive amounts of output data, so much so, that interpreting the results may require their presentation in graphical form. Because the numerical techniques used in scientific calculations are crucial to generating timely and accurate output, this type of programming usually requires programmers to be more technically proficient not only with programming languages, but also the underlying science of numerical analysis and a familiarity with scientific subjects.

Business programming usually doesn't require handling computationally complex situations like scientific computing, but often one must manage large databases of financial or other business records. Being familiar with the techniques for handling, accessing, and organizing large amounts of data is usually a plus for the business programmer.

There are other types of programming, but these will give you an idea of what to expect.
 
  • #18
Thanks, SK, for the explanation above!
 

Related to What is Best Computer Programming Language to Learn?

1. What is the best computer programming language to learn?

The best computer programming language to learn depends on your goals and interests. Some popular options include Python, Java, C++, and JavaScript. It's important to research the uses and applications of each language to determine which one aligns best with your goals.

2. Which programming language is the easiest to learn?

This is subjective and can vary from person to person. However, many people find that Python is a relatively easy language to learn due to its simple syntax and readability. It's also widely used in fields such as data science and artificial intelligence, making it a valuable skill to have.

3. What is the most in-demand programming language?

The most in-demand programming language can change over time, but currently, some of the most in-demand languages include JavaScript, Python, Java, and C++. These languages are used in a variety of industries and have a high demand for skilled professionals.

4. Is it necessary to learn multiple programming languages?

It's not necessary to learn multiple programming languages, but it can be beneficial. Learning multiple languages allows you to have a wider skill set and be able to tackle different types of projects. However, it's important to focus on mastering one language before moving on to another.

5. How long does it take to learn a programming language?

The time it takes to learn a programming language can vary depending on your level of dedication and the complexity of the language. Some people can learn the basics of a language in a few weeks, while others may take months or even years to become proficient. It's important to practice consistently and set achievable goals to track your progress.

Similar threads

  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
8
Views
918
  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
12
Replies
397
Views
14K
  • Programming and Computer Science
2
Replies
54
Views
3K
  • Programming and Computer Science
4
Replies
107
Views
5K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
  • Programming and Computer Science
Replies
7
Views
1K
  • Programming and Computer Science
Replies
6
Views
2K
Back
Top