Managed Languages vs Compiled Languages – Key Differences

managed-codeprogramming-languages

I get confused when people try to make a distinction between compiled languages and managed languages. From experience, I understand that most consider compiled languages to be C,C++ while managed languages are Java,C# (There are obviously more, but these are just few examples). But what exactly is the core difference between the two types of languages?

My understanding is that any program, regardless of what language you use is essentially "compiled" into a low-level machine code which is then interpreted, so does that kinda make managed languages a subset of compiled languages (That is, all managed languages are compiled languages but not the other way around)?

Best Answer

The difference is not in "compiled" vs. "managed", these are two orthogonal axes. By "managed" they normally mean a presence of a garbage-collected memory management and/or a presence of a virtual machine infrastructure. Both has absolutely nothing to do with compilation and whatever people deem to be opposite to it.

All this "differences" are quite blurred, artificial and irrelevant, since it is always possible to mix managed and unmanaged memory in a single runtime, and a difference between compilation and interpretation is very vague too.