Managed code: Difference between revisions

Content deleted Content added
Add more link
Monkbot (talk | contribs)
m Task 18 (cosmetic): eval 4 templates: del empty params (7×); hyphenate params (2×); del |url-status= (1×);
Line 8:
The distinction between managed and unmanaged code is prevalent and only relevant when developing applications that interact with CLR implementations. Since many{{Which|date=April 2019}} 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 |accessdateaccess-date=2009-06-29 }}</ref>
 
==Uses==
The [[Microsoft Visual C++]] compiler can produce both managed code, running under CLR, or unmanaged binaries, running directly on Windows.<ref name="Gregory">{{cite web |author=Gregory, Kate |title=Managed, Unmanaged, Native: What Kind of Code Is This? |date=2003-04-28 |url=http://www.developer.com/net/cplus/article.php/2197621 |accessdateaccess-date=2009-04-22 }}</ref>
 
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 the language [[UCSD Pascal]] using [[p-code machine|p-code]], and the operating system [[Inferno_(operating_system)|Inferno]] from [[Bell Labs]] using the [[Dis virtual machine]]. [[Java (programming language)|Java]] popularized this approach with its [[Java bytecode|bytecode]] executed by the [[Java virtual machine]].
 
[[Google]] also mention [[Java (programming language)|Java]] and [[Kotlin (programming language)|Kotlin]] are managed code in their [[Android software development#NDK|Android NDK]] [[Java Native Interface|JNI]] documents <ref>{{Cite web|title=JNI tips {{!}} Android NDK|url=https://developer.android.com/training/articles/perf-jni|access-date=2020-06-21|website=Android Developers|language=en}}</ref><ref>{{Cite web|last=|first=|date=|title=Getting started with C++ and Android Native Activities|url=https://medium.com/androiddevelopers/getting-started-with-c-and-android-native-activities-2213b402ffff|url-status=live|archive-url=|archive-date=|access-date=|website=}}</ref>
 
==References==