Which Programming Language To Learn?

In summary: You'll gain experience, so I don't want to completely dissuade you from the idea, but be aware that there is a very real downside.Because of this, I would not recommend C or C++. There's time enough to learn them later. You'll be learning abstractions of programming anyway, and when you need to check the syntax, that's what manuals are for. Same with Perl.
  • #36
While it's true what f95toli says about Ada, it's also true that Ada is a procedural language, and the trend is away from purely procedural languages. Yes, Ada 95 adds OO extensions, and I'll even say that they have done a better job than some with that, but this kind of after the fact grafting is never really clean. I'd level the same criticism at C++, by the way, the language I do most of my coding in.

As far as whether Python or Ruby is easiest, I'd try the browser-based demos I linked to above and make up your own mind. The Ruby one has a very nice tutorial; I haven't run the Python one.
 
Physics news on Phys.org
  • #37
Yeah, the Ruby one does have a nice tutorial, but I think in the end Python looks a little more challenging from what I have read here and elsewhere. I have also read a bit from Think Python. With that in mind, I am going to go after Python...and if for whatever reason it proves to be too challenging, then I will give Ruby a go. Thanks for the advice!
 
  • #38
I would say C, Fortran, or Python. Stay away from Visual Basic (I learn it and I haven't use it since. ._.) and JAVA isn't too use that often (due to its structure and how you need packages for everything).

My best recommendation would be C/C++, just because that seems to be the prevailing language. (Fortran if you want to do research or higher level, Python...well that would be my friend's suggestion and he's been bugging me for some time about it))
 
  • #39
C++ is possibly the most common used language (although Java/C# might have overtaken it).
But it is a bad language to start with. C++ is very complex and to use it properly you have to use a number of complex features (templates, boost, streams, exceptions etc).
Because of this a lot of intro books mix in C features when teaching C++ (almost all of C is allowed in C++ code). This leads to a lot of production code that is a nasty mixture of the worst features of both and is the reason for the 'learning bad habits' quote above.

There is a new learning C++ book by the create of the language (Bjarne Stroustrup) which might be better - but that it is a 1200page introduction text suggests it is too complex a task.
The other drawback with C++ (and Java) is that a lot of boiler plate code is required for even the simplest program - it is frustrating to have to start learning anything by adding 10 lines of 'magic stuff you aren't supposed to understand'
 
  • #40
Actually, I would think that what language you want to learn, and in fact even what style of programming you want to learn, depends also on what kind of applications you have in mind. If you are going to work anywhere near the hardware, I think that C is unavoidable, as you are close to the machine. If you are going to combine a computer and an oscilloscope, go for C.

For instance, I regularly combine hardware programming and software, and then I'm with VHDL for the hardware, and C for the software. If you design your own processor in VHDL, then it seems pretty logical to program it in a language which is close to it, such as C.

However, I suppose that if you are further away from the hardware, then probably the advice here is good - but I don't touch upon these fields, so I wouldn't know.
 
  • #41
I would recommend learning a functional language like OCaml, Haskell or StandardML.
 
  • #42
vanesch said:
depends also on what kind of applications you have in mind.
The OP was heading to college and wanted to learn a FIRST programming language in order to learn CS - which is a very different question from what is the best language for X.

I think that C is unavoidable, as you are close to the machine.
In most people's opinion you can't be a good programmer if you don't know C at some level.
Even if you are using a modern garbage collected high level language - you have to understand why asking for a new tiny bit of memory many times inside a loop is a bad idea.
 
  • #43
Just to be clear, I have until the Spring of 2010 until I head back. While I don't like the idea of taking this year off, I feel it is necessary at this time. So, the motivation during this time is to learn something which will at least be beneficial to me and to the career path I plan on heading into. I would much rather do that during my time away from school than just taking it easy. I do understand that CS isn't all about learning as many programming languages as possible, and that's not my goal here. Also, I really have no idea in regards to what applications to program...hopefully this will give me some idea.
 
  • #44
What are the factors that determine which programming language to use? Is it strictly a matter of using the same language that the other programmers use or are there specific attributes that make one language more appropriate for a job than others?
 
  • #45
skeptic2 said:
What are the factors that determine which programming language to use?
Often your language choice is fixed because there is existing code, libraries and in-house skills that make switching very expensive.

Is it strictly a matter of using the same language that the other programmers use or are there specific attributes that make one language more appropriate for a job than others?
Both - you can't arrive at Microsoft on day one and announce that Windows should be re-written in C# because it's better!
That's why so many of the new languages (Python/Ruby/Php) got their start on the web. Since the web projects are often new and being written from scratch there is no reason to use Cobol because your existing accounts package does. The flip side of this is programmers doing projects in order to learn the new cool language rather than the most suitable.

The other area of new language use is scripts, since they are written by one person for their own use nobody else needs to know what they are written in - so Python/Tcl/Perl/Awk etc crept in 'under the radar'.

There are some tasks that need the features of a specialist language and if you work in that area you are going to have to learn the language. You could argue that SQL is such, perhaps Erlang for telecoms or ADA for defence.

Othertimes the platform forces the choice, if you are working on an embedded uC with 64K memory you are going to be using C (if you're lucky), if it's in a web browser probably Javascript.
 

Similar threads

Replies
12
Views
2K
Replies
4
Views
1K
Replies
50
Views
6K
Replies
4
Views
952
Replies
5
Views
1K
Replies
7
Views
2K
Back
Top