Managed code: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
'''Managed code''' is computer program [[source code]] that requires and will execute only under the ''management'' of a [[Common Language Runtime]] [[virtual machine]], typically the [[.NET Framework]], or [[Mono (software)|Mono]]., The term was coined byor [[MicrosoftJava]].
 
Managed code is code written in one of over twenty high-level programming languages that are available for use with the Microsoft .NET Framework, including C#, J#, Microsoft Visual Basic .NET, Microsoft JScript and .NET, while unmanaged code refers to programs written in unsafe languages such as [[C (programming language)|C]], [[C++]], and other obsolete languages. Java code running on a [[JVM]] qualifies just as well.
 
== Terminology ==
The distinction between managed and unmanaged code is prevalentbased and only relevant when developing applications that interact with theon [[.NETmemory Frameworksafety]] or other Common Language Runtime (CLR) implementations, likeand [[Monogarbage (software)|Monocollection]]. Since many older programming languages have been ported to the CLR, the differentiation is needed to identify ''managed'' code, especially in a mixed setup. In this context, code that does not rely on the CLR is termed ''unmanaged''.
 
A source of confusion was created when Microsoft started connecting the .NET Framework with C++, and the choice of how to name the [[Managed Extensions for C++]]. It was first named ''Managed C++'' and then renamed to ''[[C++/CLI]]''. The creator of the C++ programming language and member of the C++ standards committee, [[Bjarne Stroustrup]], 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."<ref name="Stroustrup">{{cite web |author=Stroustrup, Bjarne |title=Bjarne Stroustrup's FAQ: What do you think of C++/CLI? |date=2009-06-29 |url=http://www.stroustrup.com/bs_faq.html#CppCLI |accessdate=2009-06-29 }}</ref>