English 中文(简体)
C#是否得到部分解释或实际汇编?
原标题:Is C# partially interpreted or really compiled?

与此有关的信息有许多矛盾之处。 虽然汇编了一些C#(因为C#被汇编成IL,然后在操作时按本土代码编制),但另一些人则认为,C#需要。 EN Wiki说:

Many interpreted languages are first compiled to some form of virtual machine code, which is then either interpreted or compiled at runtime to native code.

因此,我很混淆。 谁能清楚地解释这一点?

最佳回答

C#编成IL。

然后,根据需要将IL编成东道机器的本土组装语言。 有可能写出一个“网络”的运行时间,而这个时间却解释了国际空间法学会。 即使这样做,我仍然认为,c#是一种汇编的语言。

问题回答

A purely compiled language has some advantages. Speed, as a rule, and often working set size. A purely interpreted language has some advantages. Flexibility of not needing an explicit compilation stage that allows us to edit in place, and often easier portability.

在这种情况下,一种被断断断断续续的语言在中间。

仅凭这一原因,我们就只能考虑一种被忽略的语言,这种语言要么是编纂的,要么是根据我们所关心的哪一种情况来解释的,要么取决于我们所关心的是哪一种情况,要么是因为我们有偏见,要么是针对另一个。

C#还可以在首期汇编,就像在伙伴关系中那样。 NET使得它接近于对这一案件进行解释(尽管它仍然汇编到国际不动产业协会,然后在这个案件中被忽略)。 当然,它完全拥有在本案中解释的所有优势(与传统伙伴关系中使用的VB文本或J文本相比),以及汇编的大部分优势。

严格地说,没有任何语言被打断、解释或编辑成文。 我们可以将“C”类推到本地法典中(尽管如果它做的是象用IL和断肢等有活力的组装的话)。 我们可以为C级或C++(每一人都这样做)撰写一盘 in。 然而,在最常见的使用案例中,C#被汇编到IL,然后被打断,这并不是解释或编纂的典型定义。

太多的批评和基于意见的声明。

首先,C# isn t 一种解释性语言;CLR和JV被视为“营业时间”或“中风”,但同一名称适用于Perl等。 这给与姓名有关的人造成了许多混乱。

The term "Interpreter" referencing a runtime generally means existing code interprets some non-native code. There are two large paradigms: Parsing reads the raw source code and takes logical actions; bytecode execution first compiles the code to a non-native binary representation, which requires much fewer CPU cycles to interpret.

Java最初被编成特稿,然后通过译员进行;现在,联合考试委员会读成特稿,并按本地法编纂。 CIL也这样做:CLR在本地法典中采用实时汇编。

考虑所有源代码的组合,采用编外编码,汇编本地的、及时的汇编,通过汇编者管理源代码,以适应当地人的情况,等等。 编辑或解释某种语言的语义毫无意义。

举例来说,许多解释性的语言使用准时密码汇编。 C#向土著和土著事务部汇编;相比之下,Perl立即编纂成按特制编码的文字,然后通过口译员操作该编码。 您只能以CIL按字母代码格式操作C#组;你只能以原始源代码格式操作Perl字母。

实时汇编者还拥有大量外部和内部工具。 运行时间跟踪各种职能的履行情况,然后调整守则的布局,以优化其特定执行流动的分行和编码组织。 这意味着,《国际投资合同法》的操作速度可以快于本土编造的法典(例如C++通常采用,或像C#通过IL2CPP操作),因为《国际投资协议》调整其优化战略,使之适应守则的实际执行情况。

Welcome to the world of computer programming. We decided to make it extremely complicated, then attach non-descriptive names to everything. The purpose is to create flamewars over the definition of words which have no practical meaning.

If you feel, learned, or are old school, that a compiled EXE is going from source to machine code then C# is interpreted. If you think compiled means converting source code into other code such as byte code, then yes it’s compiled. For me, anything that takes run-time processing to work in the OS it was built for is interpreted.

http://msdn.microsoft.com/library/z1zx9t92“http://msdn.microsoft.com/library/z1zx9t92。

Source code written in C# is compiled into an intermediate language (IL) that conforms to the CLI specification.

(...)

When the C# program is executed, the assembly is loaded into the CLR, which might take various actions based on the information in the manifest. Then, if the security requirements are met, the CLR performs just in time (JIT) compilation to convert the IL code to native machine instructions.

首先,请了解解释和编纂的定义。

"Compile" (when referring to code) means to translate code from one language to another. Typically from human readable source code into machine code that the target processer can... process.

Interpret”(在提到代码时) ALSO系指将代码从一种语文翻译成另一种语文。 但这一次,它通常从人类可读源代码变成中间代码,用虚拟机器将其解释成机码。

Just to be clear
Source code -> Compiler -> Machine code
Source code -> Compiler -> Byte Code -> Interpreter -> Machine code

在理论中,任何语言均可成为,或。 通常,Java汇编成星码,由Java虚拟机器解释成机码。 C#通常被解读为《刑法》,由《刑法》编纂,后者是通用语言操作时间,是另一个虚拟机器。

迄今为止,整个东西都是销售舱。 添加了“解释”这一术语(或至少增加使用),以帮助说明为什么要

C# is both interpret and edited in its life. C#被汇编成一种虚拟语言,由考试和测验局解释。

混淆源于“混合语言”的幻觉概念。

从某种意义上来说,“混合语言”是一种错误,因为编纂或解释不是语言的财产,而是管理时间的财产。

e.g. 你可以写一名口译人员,但人们通常称之为“混合语言”,因为C执行者汇编成机码,而语言的设计则考虑到汇编。

多数语文,如果不是所有语文,都需要翻译,将其文字翻译成机码,以便让pu理解和执行。

Each language handles the translation process differently!

例如,“AutoIt”是我们可以描述为100%解释的语言!

why?

Because "AutoIt" interpreter is constantly needed while its script is being executed! See example below:

Loop, 1000
Any-Code

"AutoIt" interpreter would have to translate "Any-Code" 1000 times to machine code, which automatically makes "AutoIt" a slow language!

另一方面,C#处理翻译过程的方式不同,在文字执行之前,C#口译只需要一次,因为文字执行期间不需要再翻译!

C# 译员只能将“Any-Code”翻译成机码,自动使“C#”成为一种快言!

基本上,

  • 在文字执行期间需要口译的语文是“口译语言”。

  • 只需要翻译一次的语文(在文字执行之前)是“语言”。

最后,

  • “因特网”是一种“口译语言”!

  • “C#”是一个“混合语言”!

我认为这是一个相当老的问题。

从我的观点看,解释性守则将穿过口译员,按行文翻译和执行。 就像javascript一样,它是一种解释性法典,如果一行 j印有错误,那么文字就只能打破。

虽然编纂成文法,但它将采用汇编法,将所有法典翻译成另一种形式的法典,而不首先执行。 执行是在另一个背景下进行的。

C#, like Java, has a hybrid language processor. Hybrid processors perform the jobs of both interpretation and compilation.

Since a computer can only execute binary code, any language will lead to the production of binary code at one point or another. The question is : does the language let you produce a program in binary code? If yes, then it is a compiled language : by definition "compiled" in "compiled language" refers to compilation into binary code, not transformation into some intermediary code. If the language lead to the production of such intermediary code for a program, it will need an additional software to perform the binary compilation from this code : it is then an interpreted language. Is a program "compiled" by C# directly executable on a machine without any other software at all installed on this machine? if no, then it is an interpreted language. For an interpreted language, it is an interpreter that will generate the underlying binary code, most of the time in a dynamic way since this mechanism is the basis of the flexibility of such languages. rem. : sometimes it does not look obvious because the interpreter is bundled into the OS

C#是可汇编的语言。

也许,由于我也听到了这些看法,一些人认为C#语言有一个口译员,这是像项目这样的项目。

C# Interpreter Console

or, for example, famous

https://www.linqpad.net” rel=“nofollow noreferer”>LinqPAD

where you can write just lines of the code and execute them, which brings to think that it s Python like language, which is not true. It compiles those lines and executes them, like a ordinary compilable programming language (from workflow point of view).

这里正在进行大量辩论。 我阅读了所有答案,希望根据我的研究报告和<代码>发表一些结论。 方案语言执行概念。

<代码>的概念 方案语言执行

<代码>方案执行语言:在计算机编程中,方案语言实施是实施计算机程序的一个系统。 语文方案执行有两种通用办法:

  1. <>Compil:

    该方案由汇编者阅读,将其翻译成其他一些语文,如<条码>bytecode或机关代码。 译本可以由硬件直接执行,也可以作为对另一名口译员或另一名编辑的投入。

  2. <>Interpretation:

    口译是一种计算机程序,直接执行以节目制作或笔录语言书写的指示,而不必事先要求将这些指示编入机器语言方案。

    • Parse the source code and perform its behavior directly.
    • Translate source code into some efficient intermediate representation or object code and immediately execute that.
    • Explicitly execute stored precompiled bytecode made by a compiler and matched with the interpreter Virtual Machine.

http://www.hchr.org。

  • So any language which converts the code to intermediate byte code or machine code are compiled languages.
  • There are multiple types of Interpreters like Byte Code Interpreters, Just-in-time interpreters, etc.

<>0> Famous Compiled 语

  • JAVA C# C C++ GO Kotlin Rust

www.un.org/Depts/DGACM/index_spanish.htm 英文译文:

  • JavaScript PHP Python

www.un.org/Depts/DGACM/index_spanish.htm 直接编纂成文法第一版的语文:

  • Bytecode interpreters (virtual machines) are generally slower than direct execution of machine code. Any interpreter has some overhead when converting bytecode to actual machine instructions.
  • Interpreters do line by line execution.
  • So, directly compiled languages like C++/C are faster then Java/C#

There are an implementation of C# that is a compiled language.

它是Remobjects c# Island, 直接编纂成双轨机码,在没有信箱的情况下运行,但没有运行时间,而是直接使用APIC平台(关于缩微胶、 Coco和铁质)。

还与C/C++直接合作的主题c 汇编了校准,因为它呼吁公约转化为公约。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签