当前位置:网站首页>What are compiled languages and interpreted languages?
What are compiled languages and interpreted languages?
2022-07-07 16:07:00 【Le_ Sam】
First, what are compiled languages and interpreted languages ?
Computers can't understand high-level languages , Can not directly execute high-level language , It can only understand machine language directly , So if a program written in any high-level language wants to be run by a computer , It has to be converted into computer language , That's machine code .

Computers can't understand high-level languages , Can not directly execute high-level language , It can only understand machine language directly , So if a program written in any high-level language wants to be run by a computer , It has to be converted into computer language , That's machine code . There are two ways of this transformation :
1. compile
2. explain
Therefore, high-level languages are also divided into compiled languages and interpreted languages .
The main difference is that , The former can run on the platform after compiling the source program , The latter is compiled during runtime . So the former runs fast , The latter has good cross platform performance .
Compiler language
Use a special compiler , For a specific platform , Compile the high-level language source code into machine code that can be executed by the hardware of the platform , And packaging into the platform can identify the executable program format .
characteristic
Before a program written in a compiled language is executed , A special compilation process is needed , Compile the source code into a machine language file , Such as exe File format , When you want to run again later , You can use the compilation results directly , Such as direct operation exe file . Because it only needs to be compiled once , You don't need to compile later , So compiler language is efficient .
summary
1. Compile into platform related machine language files at one time , The runtime is detached from the development environment , High operational efficiency ;
2. Platform specific , Generally, it can't be ported to other platforms ;
3. The existing C、C++、Objective All of them belong to compiler language .

Explanatory language
Use a special interpreter to interpret the source program line by line into a specific platform machine code and execute it immediately . It is only when the code is executed that the interpreter dynamically translates and executes line by line , Instead of translating before execution .
characteristic
Interpretive languages don't need to be compiled in advance , It directly interprets the source code into machine code and executes it immediately , So as long as a platform provides the corresponding interpreter can run the program .
summary
1. Every time an interpreted language runs, it needs to interpret the source code as machine code and execute it , Low efficiency ;
2. As long as the platform provides the corresponding interpreter , You can run the source code , So it is easy to transplant the source program ;
3.Python Etc. belong to explanatory language .
Compiled and interpreted , Both have advantages and disadvantages
The former is due to the fast execution of the program , Lower system requirements under the same conditions , So it's like developing an operating system 、 Large applications 、 The database system uses it all the time , image C/C++、Pascal/Object Pascal(Delphi) They are all compiled languages , And some web script 、 Server script and auxiliary development interface do not require high speed 、 Programs that have certain requirements for compatibility between different system platforms usually use interpretative languages , Such as Java、JavaScript、VBScript、Perl、Python、Ruby、MATLAB wait .
About java
Java Different from other languages . because java There are different for different platforms JVM, Cross platform implementation . therefore Java Language has a saying that compilation runs everywhere .
1. You can say it's compiled : Because of all the Java The code is compiled ,.java There is no use without compilation .
2. You can say it's interpretive : because java The code cannot be run directly after compilation , It is interpreted to run in JVM Upper , So it's interpreted to run , That's even the explanation .
3. however , current JVM For efficiency , There are some. JIT Optimize . It will .class The binary code of is compiled into local code to run directly , therefore , It's compiled again .


Personally think that ,java It's an interpretive language , Because though java You also need to compile , Translate it into .class file , But it's not a machine recognizable language , It's bytecode , In the end jvm The explanation of , In order to execute , It's also java Cross platform reasons . So I said java It's compiled , It's also explanatory , But if it has to be classified , From a conceptual definition , I'm afraid java It should be put into explanatory language .
Compiled languages include :C、C++、Delphi、Pascal、Fortran
Explanatory languages include :Java、Basic、javascript、python
边栏推荐
- Three. JS introductory learning notes 18: how to export JSON files with Blender
- Summary of knowledge points of xlua hot update solution
- What about the pointer in neural network C language
- Communication mode between application program and MATLAB
- 谈谈 SAP iRPA Studio 创建的本地项目的云端部署问题
- Annexb and avcc are two methods of data segmentation in decoding
- 安科瑞电网智能化发展的必然趋势电力系统采用微机保护装置是
- A wave of open source notebooks is coming
- Shader Language
- Virtual memory, physical memory /ram what
猜你喜欢

Virtual memory, physical memory /ram what

【微信小程序】Chapter(5):微信小程序基础API接口

Asynchronous application of generator function

【花雕体验】15 尝试搭建Beetle ESP32 C3之Arduino开发环境

2022第四届中国(济南)国际智慧养老产业展览会,山东老博会

Mysql database basic operation DQL basic query

Good news! Kelan sundb database and Hongshu technology privacy data protection management software complete compatibility adaptation

航運船公司人工智能AI產品成熟化標准化規模應用,全球港航人工智能/集裝箱人工智能領軍者CIMC中集飛瞳,打造國際航運智能化標杆

Three. JS introductory learning notes 00: coordinate system, camera (temporarily understood)

Three. JS introductory learning notes 03: perspective projection camera
随机推荐
AB package details in unity (super detail, features, packaging, loading, manager)
What about the pointer in neural network C language
航天宏图信息中标乌鲁木齐某单位数据库系统研发项目
Simple understanding and application of TS generics
Three. JS introductory learning notes 03: perspective projection camera
Cut ffmpeg as needed, and use emscripten to compile and run
Xingruige database was shortlisted as the "typical solution for information technology application and innovation in Fujian Province in 2021"
Dotween -- ease function
讲师征集令 | Apache SeaTunnel(Incubating) Meetup 分享嘉宾火热招募中!
用手机在通达信上开户靠谱吗?这样炒股有没有什么安全隐患
LeetCode3_ Longest substring without duplicate characters
Three. JS introductory learning notes 19: how to import FBX static model
深度之眼(七)——矩阵的初等变换(附:数模一些模型的解释)
UE4 exports the picture + text combination diagram through ucanvasrendertarget2d
Three singleton modes of unity (hungry man, lazy man, monobehavior)
numpy--疫情数据分析案例
【微信小程序】Chapter(5):微信小程序基础API接口
强化实时数据管理,英方软件助力医保平台安全建设
保证接口数据安全的10种方案
Leetcode-136-只出现一次的数(用异或来解答)