Merge (reason: none given)
Managed code is a differentiation coined by Microsoft to identify computer program code that requires and will only execute under the "management" of a Common Language Runtime virtual machine (resulting in Bytecode).
This disambiguation is prevalent and only relevant when developing applications that interact with the .NET Framework or other Common Language Runtime implementations, like Mono. Since some of the classic programming languages have been ported into the Common Language Runtime, the differentiation is needed to identify "managed" code, especially in a mixed setup. In this same context programmers also refer to code that doesn't depend on the Common Language Runtime as unmanaged.
Microsoft's Visual C++ development environment can produce both managed code (running under the .NET Common Language Runtime) or compiled binaries, running directly on the Windows platform with the help of its C Runtime Library..
Benefits of using managed code include programmer convenience (by increasing the level of abstraction, creating smaller models) and enhanced security guarantees, depending on the platform (including the VM implementation). There are many historical examples of code running on virtual machines, such as UCSD Pascal utilizing p-code. Java popularized this approach with its bytecode executed by the Java Virtual Machine.
Another source of confusion was created when Microsoft started connecting the .NET Framework with C++, and the selection on how to name the Managed Extensions for C++, it was first named Managed C++ and then renamed to C++/CLI. Bjarne Stroustrup, creator of the C++ programming language and member of the C++ standards committee even commented on this issue, "On the difficult and controversial question of what the CLI binding/extensions to C++ is to be called, I prefer C++/CLI as a shorthand for "The CLI extensions to ISO C++". Keeping C++ as part of the name reminds people what is the base language and will help keep C++ a proper subset of C++ with the C++/CLI extensions."
- ↑ Gregory, Kate (2003-04-28). "Managed, Unmanaged, Native: What Kind of Code Is This?". http://www.developer.com/net/cplus/article.php/2197621. Retrieved 2009-04-22.
- ↑ Stroustrup, Bjarne (2009-06-29). "Bjarne Stroustrup's FAQ: What do you think of C++/CLI?". http://www2.research.att.com/~bs/bs_faq.html#CppCLI. Retrieved 2009-06-29.