39

When learning new languages, is it better to commit yourself to one language 100% and wait until you've "mastered" it to move on to another, or to work on learning different languages at the same time?

If it matters, I'm currently learning C++ and I'd like to know Java and Python as well.

7

8 Answers 8

32

Not only do I not see a problem with learning multiple languages at one time, I think it can directly benefit you in that something in one language may clear up a problem area you may have in another language. For example, my main language is C# and when dealing with LINQ I used the SQL format (which is fine, I’m not knocking it at all, but it just didn’t seem like the “cool way” to do it). I stayed away from Lambdas because, to be honest, I didn’t understand them and the C# documentation that I saw didn’t provide a clear definition (for me). Then I started to pick up some books on F# and started learning that, which gave me the “ah ha!” moment of understanding how Lambdas are.

I have found that as I have experienced more and more with other languages (and frameworks) I have become better at C# (and ASP.Net). That is why I believe that learning multiple languages at one time isn’t a bad thing at all!

1
  • 1
    I totally agree and I also started with C#. There were many things I encountered in that language that from my beginner's perspective were very hard to grasp and if I did grasp them, understanding what they were for or why they were used was just as hard. I've since learned about a couple other languages and it has made all the difference in the world. Especially since each language is different you can learn different aspects of programming from each language.
    – fender1901
    Commented Jun 10, 2011 at 18:56
50

If it is your first language, I think it would be better to learn it well enough to understand how a programming language works.

Once you have good foundations, you can pick as many as you want.

1
  • 2
    +1 I think it makes a big difference whether you are learning your first three languages vs. your fourth, fifth, sixth, etc. Commented Feb 4, 2011 at 18:18
13

I think an important skill for programmers is the ability to learn new programming languages. As such I'd tend to suggest that one try to learn a single language first and then add others.

Whatever your first language is the process of learning additional languages should:

  • Find a good syntax reference for the new language
  • Identify the strengths of the new language, don't just code in the new language as if it were one you already know (programming with an accent)
  • Explore areas of the new language that do not map to prior languages you've used before
  • Find code examples, and without reviewing them try to code the same thing from scratch and see how your implementation differed from the example

Over time as you accumulate languages you'll form your own internal abstract pseudocode language that will help you translate between the languages you know. This internal language is the framework you'll use to learn new languages quickly.

1
  • 2
    +1 for "identify the strengths of the new language...". Very nice
    – Nick Burns
    Commented Jul 24, 2013 at 3:37
8

Learning languages in parallel is pretty normal thing. For example web programming. You're dealing with at least three languages: server side (php, java, .net, ruby, python...), client code (java script and html), database (sql).

2
  • nor html nor sql are programming languages .
    – Ahmed Eid
    Commented Jul 1, 2017 at 4:52
  • the letter l stands for language Commented Jul 1, 2017 at 5:54
7

I don't see a problem learning multiple languages at a time. In fact, you never truely master a language, so really, any time you work with more than one language, you're probably learning both of them.

You may want to concentrate on one language to get through the basics just to keep yourself from getting the two languages confused. This is especially true if you're learning similar languages, like Java and C#.

1
  • JavaScript/Python may be a good choice by virtue of their differences. As an example. Commented May 7, 2018 at 16:55
6

I have been teaching programming for several years, so I can share my experience with you. I assume that C# is your first language, so my experience teaching programming to people that had never programmed before may be useful.

First of all, let me tell you that learning more than one language is something that every seasoned programmer should do. But this does not mean that you should learn several languages at the same time if you are just starting.

Over the years, students have shown that it takes about a year for a language to solidify in the mind (at least the first one), sometimes a little more, sometimes a little less. If you try to teach more than one language in one year students tend to mix them up and confuse concepts and languages. Although students make progress, they get into a lot of bad habits that is difficult to weed out later. If you are learning on your own, this risk is higher.

However, I have noticed that it helps if you teach two languages with a very different syntax. When two programming languages look really different it helps the mind to see them as really different entities without polluting each other. (When one programming language helps you understand difficult concepts in another language, that is good; when one language makes you write bad code in another language, that is bad).

Therefore, my recommendation would be to stick to one programming language for your first year. Alternatively, it may be a good idea to learn two languages at the same time as long as they are / look very different. If your first language is C#, I would stay away from C, C++, Objective C, and Java for sure; and probably Python, Ruby, and Javascript. I would recommend combining C# with a functional language like Haskell, Scheme, F#, Erlang, Clojure, or maybe Scala.

5

I think learning multiple languages at a time is actually better than learning one at a time, because if the languages are sufficiently different, each gives you a break from the other. Try to stagger them so that you start on a new one once you've gotten through the "absolute newbie" stage of the previous one; this way you'll have a much better chance of retaining not only what you learned about the language but how you learned a new language. (Generalized language learning skill is something you'll be very grateful for later in programming life.)

That said, learning your first language requires a huge investment of time and energy, and you may simply not have the time to take on another big project during this process. If you're thinking about starting another language because you're sick of C++ - don't! It will encourage you to procrastinate. If you're thinking about starting another language because you keep seeing mentions of projects written in (say) Java and you're frustrated that you can't easily read and analyze the code - do! This is a great reason to learn another language at any time.

2

I found learning multiple languages simultaneously may lead to obviously taking longer to learn one specific language (goes without saying really). However, in my case it has allowed me to decide which languages I prefer and the style of coding I enjoy most.

In my case I started with C# then got into Python and F#. I really liked the functional style of F# which led me to try Scala and Clojure. Now because of learning all these languages I've found Scala to be a good fit for what I do. Plus I am now really confident in OOP and functional styles and can read and write several languages competently. It's a great skill to have.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.