Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Managed code

From Wikipedia, the free encyclopedia
Computer program code
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Managed code" – news ·newspapers ·books ·scholar ·JSTOR
(April 2019) (Learn how and when to remove this message)

Managed code iscomputer program code that requires and will execute only under the management of aCommon Language Infrastructure (CLI);Virtual Execution System (VES);virtual machine, e.g..NET,CoreFX, or.NET Framework;Common Language Runtime (CLR); orMono. The term was coined byMicrosoft.

Managed code is the compiler output ofsource code written in one of over twenty high-levelprogramming languages, includingC#,J# andVisual Basic .NET.

Terminology

[edit]

The true and fine distinction between managed and unmanaged code is prevalent and only relevant when developing applications that interact with CLR implementations. Since many older programming languages(list) 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 withC++, and the choice of how to name theManaged Extensions for C++. It was first named Managed C++ and then renamed toC++/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."[1]

Uses

[edit]

TheMicrosoft Visual C++ compiler can produce both managed code, running under CLR, or unmanaged binaries, running directly on Windows.[2]

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 languageUCSD Pascal usingp-code, and the operating systemInferno fromBell Labs using theDis virtual machine.Java popularized this approach with itsbytecode executed by theJava virtual machine.

Google also mentions thatJava andKotlin are managed code in theirAndroid NDKJNI documents.[3][4]

References

[edit]
  1. ^Stroustrup, Bjarne (2009-06-29)."Bjarne Stroustrup's FAQ: What do you think of C++/CLI?". Retrieved2009-06-29.
  2. ^Gregory, Kate (2003-04-28)."Managed, Unmanaged, Native: What Kind of Code Is This?". Retrieved2009-04-22.
  3. ^"JNI tips | Android NDK".Android Developers. Retrieved2020-06-21.
  4. ^"Getting started with C++ and Android Native Activities".

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Managed_code&oldid=1286874182"
Category:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp