When would you consider incorporating another language into your project? Some domains are inherently multi-language ( Database interaction, interactive web client side development), but others could be done with 1 language and the idea of introducing another language could hinder understanding more than help it.

Currently I have high performance code in C++ that also needs to do a fair amount of routine file and i\o manipulation which would be easier and faster to write correctly in a higher order language like Python. To be honest I don't know C++ extremely well when it comes to 3rd party libraries including Boost.


Different programming languages have their strengths and weaknesses, and I find nothing wrong with wanting to take advantage of each. I would caution that you have a strong boundary, however. For example, blender has python on the user interface and scripting layers, but C and C++ further down. That arrangement works quite well, where one or two python classes thrown in here and there would probably not.

  • +1 for mentioning different programming languages have their strengths and weaknesses. – Fanatic23 Feb 8 '11 at 11:59
  • Using a scripting language as a control/customisation/extension language is probably the only time to do it. For example, most of Civilization IV is coded in C/C++, but the environment builder/modifier makes use of Python. Painkiller follows the same approach, except that it uses Lua instead of Python. – Agi Hammerthief Feb 15 '15 at 15:54

Well the first thing that comes to mind is web programming. Other than that it is generally better to keep the number of languages to a minimum if at all possible. You may know C++, Python, PHP, and Visual Basic, but the people who inherit the project from you may not. Unless there is a massive benefit from adding (most of the time) an unnecessary complexity, I avoid it.


Anytime those languages, given the programmer expertise and skills currently available, are best for the job.

And there are many platforms which glue together a compiled language an an interpretive language for development combinations requiring max performance plus other stuff, including iOS/iPhoneOS(+webview), Android(+NDK), and webOS(+PDK).


I know personally if I had to do heavy computations in a .Net program I would use F# and C# to write the program. I would try to do the calculations in an async workflow in F# while the rest of the code would be in C# as it is much easier to do that kind of thing in F# and the two languages would mesh well together because of the .Net framework.


There are many projects that can benefit from a smattering of an embedded scripting language. Especially small, easily embeddable languages like Lua or Tkl can be integrated very easily.

However, most interpreted languages will never reach the speed of a natively compiled one. If performance is at a premium, this has to be considered. That said, even some low-performance embedded-device can probably run Lua code just fine if it is not used in the most performance critical part.

Most scripting languages offer great advantages in terms of programmer productivity (or non-programmer-interoperability!) over compiled low-level languages like C/C++.


I'm always using multiple languages within a single project. It is always much more efficient than any single language, no matter what the problem domain is. It is called Language Oriented Programming. It really helps if there is a common platform that simplifies an interaction between different languages, but things like C++ and Python works well together without such a platform.

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