Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Which programming language should I learn?

  1. Nov 6, 2009 #1
    I'm going for a major in mechanical engineering and am planning on getting a PhD. I was planning on having a minor in Computer Science just to help with research and general programming.

    With all of the programming languages out there, it gets kind of overwhelming when trying to narrow it down to one language. I've seen that Fortran is described as an engineering language but my school requires you to take a programming class in C++ to graduate with an Associates in engineering (I already took that class).

    Any insight would be appreciated.
  2. jcsd
  3. Nov 6, 2009 #2
    Keep studying C/C++. Once you master it you can literally pick up any new language in a weekend.
  4. Nov 10, 2009 #3


    User Avatar
    Gold Member

    I would learn either Java or C# which are object oriented, perform well for calculations, and are a heck of a lot safer to use for the average programmer than C++. In the "real world", one probably only needs C++ if doing systems programming (on a computer operating system) or extreme multimedia as in computer games. Otherwise, for physics type calculations, you'll be a lot happier in the long run equipping yourself with a language that does automatic garbage collections and has well-behaved objects without the hazards of multiple inheritance and broken pointers.
  5. Nov 10, 2009 #4


    User Avatar
    Science Advisor
    Homework Helper

    The advantage of C/C++ is that most libraries are written in C or can easily link to it.
    The other popular choice is python, it has a lot of scientific library support and links easily with c libs
  6. Nov 11, 2009 #5
    What happened to he other posts in this thread (I made one)
  7. Nov 11, 2009 #6


    Staff: Mentor

  8. Nov 11, 2009 #7
    You wouldn't if you were studying engineering. C++ is essential for the sciences, everything else is secondary. Just about all current work is developed in C and C++. Unless you're up for the job of rewriting decades of library development in C#, you don't have much choice. The situation may change, but if it does it will change very slowly.

    My suggestion would be learn C++ and learn it well. Then learn a scripting language such as Python, which will be quick and easy if you know C++. This way you have the essential foundation for engineering work, and you have the high level language which comes in handy everywhere else (prototyping design ideas, etc).
  9. Jan 15, 2010 #8
    I first learned C++ during my first semester in college. I have now been playing around with visual basic(for applications) or VBA its pretty nice. I know its not as powerfull as c++, but if you have excel you can do some cool stuff. I had a professor who swears by excel and VBA. He is mainly a heat transfer guy and has used excel/VBA to model 3-D heat tranfer amoung other things. I have been working on developing an application to numerically solve n-body gravitational problems. The language is different that c++ but certain things feel pretty similar. Anyway I would still take c++ it makes it easier to learn a new language.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Which programming language should I learn?