6

I primarily work in C++. My question is, for a C++ developer, what languages are beneficial to learn, from a job-profile point of view. For example, I see a lot of work combining C++ and Php these days. Conversely, I don't see a lot of work combining Ruby and C++ (unfortunately).

Of course, learning another language is beneficial regardless of whether it compliments a language.

2
  • I learned MATLAB before I learn C++, and I thought C++ was a good way to optimize key parts of an algorithm originally prototyped in MATLAB.
    – rwong
    Oct 7, 2010 at 14:51
  • It completely depends on what kind of work you want to do! C++ is good for hardware, drivers, and operating systems. A good compliment would be assembly if that's the work you want to keep doing, but I sort of doubt that or you'd already be doing it. Why not take this excellent free course: coursera.org/course/proglang to help you decide? Just don't judge OOP based on Ruby. Kotlin is my favorite OOP lang these days. May 31, 2016 at 20:18

10 Answers 10

8

I'd vote for Python or Ruby. C++ is The Language for doing as much as possible statically at compile time. Learning Python or Ruby will teach you how to think in terms of doing things dynamically at runtime. I'm in a similar situation, using D and Python as my primary languages. D's template metaprogramming is much more powerful than C++'s, but it's still all at compile time. Python's metaprogramming and reflection is all at runtime. It's a very useful combination because often there are idioms that are useful in both languages, but are more obvious in one than the other. Therefore, my D experience makes me a better Python programmer and vice-versa.

On another note, Python and C++ complement each other in that C++ is good at performance and bad at programmer productivity, where Python is just the opposite. If you learn both, you'll have mastered both ends of the spectrum on this tradeoff.

1
  • Python and C++ are even more complementary when you address the issue mentioned in the 2nd paragraph (performance) by embedding one into the other. It's not only straightforward (with e.g. Swig or Boost.Python) but also very rewarding. Being able to build a fully-featured C++ based Python extension module is certainly a line in your technical CV.
    – user44761
    May 30, 2016 at 6:50
10

I think PHP compliments C++ nicely. In both cases, you're scraping the bottom of the barrel of languages, but PHP has so many annoyances that it makes C++ look like a diamond in comparison.

As far as languages that complement C++, I'm not sure.

10
  • Nicely spotted - I never knew that little English language nuance existed. Fixed.
    – MM01
    Oct 7, 2010 at 15:00
  • 3
    +1 for being a smartypants! Oct 7, 2010 at 15:04
  • English is a good language for it;) "Oh! C++ is so dashing!"
    – Matt Ellen
    Oct 7, 2010 at 15:20
  • 3
    I disagree that C++ is "scraping the bottom of the barrel," (I have a much higher view of the language) but otherwise agree that PHP makes it shine in comparison. +1 for snark. :)
    – greyfade
    Oct 7, 2010 at 16:18
  • 1
    You have made my day... Oct 7, 2010 at 16:32
7

Erlang

I recommend Erlang. C++ is mostly used for performance, but it doesn't have great support for large scale concurrency. With that in mind Elrang would be a great complement since it has great concurrency performance but not very good performance for number crunching. Erlang is often used together with C/C++ in distributed and embedded systems, specially in telecom. Erlang is good support for interfacing with C&C++.

5

Python is often used in combination with C++ for file manipulation (and c++ code generation) and embedded scripting.

3

It does depend a little upon the platforms you are supporting, but if Windows is a platform, learning C# and the related techologies should keep you employeed for some time.

1
  • C# really does compliment C++ well. We use C++ for libraries that need to be fast, and leverage C# and the .Net framework to make it easy to write a modern UI around it.
    – RubberDuck
    May 30, 2016 at 12:09
2

C++: a kitchen-sink language, statically and manifestly typed.

Sounds like a good complement would be a language with a very few concepts, dynamically and latently typed. Sounds like Smalltalk!

1
  • Shell/Bash scripting I see is a great thing to have in your tool belt.
  • PHP as you said is a good one.
  • C programming is also fair game as far as I am concerned.
1

F# It's a functional language, statically/strongly typed but with type inference. You can use OO-style if you wish. Has a REPL for quick prototyping/scripting, type providers to access all kinds of data, pattern matching, easy async, parallel, and agent based computations.

0

It depends, what problems do you need to solve to accomplish your main objective: delivering software?

For me, knowing Labview lets me maintain and extend our real-time data collection tools. These produce a lot of raw data, so having a scripting language to parse and reduce it is extremely useful. I use Ruby.

Batch and/or shell scripting can also come in quite handy.

0

Node.js supports C++ addons. With the attention REST and microservices have been getting lately Node.js and JavaScript would be great addition to the language arsenal of a C++ programmer (if you don't like dynamic languages, there's a superset of JavaScript offering type checking called TypeScript.

Although C++ is not used very often in combination with Node.js, it can be easily integrated.

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