程式语言

A programming language is used to write computer programs including applications, utilities, and systems programs. Before the Java and C# programming languages appeared, computer programs were either compiled or interpreted. 

编程语言用于编写包括应用程序,实用程序和系统程序的计算机程序。 在Java和C#编程语言出现之前,已经对计算机程序进行了编译或解释。

A compiled program is written as a series of humanly understandable computer instructions that can be read by a compiler and linker and translated into machine code so that a computer can understand and run it. Fortran, Pascal, Assembly Language, C, and C++ programming languages are almost always compiled in this way. Other programs, such as Basic, JavaScript, and VBScript, are interpreted. The differences between compiled and interpreted languages can be confusing.

编译后的程序以一系列易于理解的计算机指令编写,可由编译器和链接器读取并转换为机器代码,以便计算机可以理解和运行它。 Fortran,Pascal,汇编语言,C和C ++编程语言几乎总是以这种方式进行编译。 解释了其他程序,例如Basic,JavaScript和VBScript。 编译语言和解释语言之间的差异可能会造成混淆。

编译程序 ( Compiling a Program )

The development of a compiled program follows these basic steps:

编译程序的开发遵循以下基本步骤:

  1. Write or edit the program

    编写或编辑程序
  2. Compile the program into machine code files that are specific to the target machine

    将程序编译成特定于目标机器的机器代码文件
  3. Link the machine code files into a runnable program (known as an EXE file)

    将机器代码文件链接到可运行的程序(称为EXE文件)
  4. Debug or run the program

    调试或运行程序

解释程序 ( Interpreting a Program )

Interpreting a program is a much faster process that's helpful for novice programmers when editing and testing their code. These programs run slower than compiled programs. The steps to interpret a program are:

解释程序是一个更快的过程,对于新手程序员在编辑和测试其代码时很有用。 这些程序比编译的程序运行慢。 解释程序的步骤是:

  1. Write or edit the program

    编写或编辑程序
  2. Debug or run the program using an interpreter program

    使用解释程序调试或运行程序

Java和C# ( Java and C# )

Both Java and C# are semi-compiled. Compiling Java generates bytecode that is later interpreted by a Java virtual machine. As a result, the code is compiled in a two-stage process. 

Java和C#都是半编译的。 编译Java会生成字节码,稍后由Java虚拟机对其进行解释。 结果,代码分两个阶段进行编译。

C# is compiled into Common Intermediate Language, which is then run by the Common Language Runtime part of the .NET framework, an environment that supports just-in-time compilation.

C#被编译为通用中间语言,然后由.NET框架的公共语言运行时部分运行,该环境支持即时编译。

The speed of C# and Java is almost as fast as a true compiled language. As far as speed goes, C, C++, and C# all are sufficiently speedy for games and operating systems.

C#和Java的速度几乎与真正的编译语言一样快。 就速度而言,C,C ++和C#对于游戏和操作系统而言都足够快。

计算机上的程序 ( Programs on a Computer )

From the moment you turn on your computer, it is running programs, carrying out instructions, testing RAM and accessing the operating system on its drive.

从打开计算机的那一刻起,它便开始运行程序,执行指令,测试RAM并访问其驱动器上的操作系统。

Each and every operation that your computer performs has instructions that someone had to write in a programming language. For example, the Windows 10 operating system has roughly 50 million lines of code. These had to be created, compiled and tested; a long and complex task.

您的计算机执行的每一项操作都必须有人用某种编程语言编写指令。 例如,Windows 10操作系统大约有5000万行代码。 这些必须创建,编译和测试; 一项漫长而复杂的任务。

现在正在使用的编程语言 ( Programming Languages Now In Use )

Top programming languages for PCs are Java and C++ with C# close behind and C holding its own. Apple products use Objective-C and Swift programming languages.

PC的顶级编程语言是Java和C ++, C#紧随其后,C拥有自己的语言。 苹果产品使用Objective-C和Swift编程语言。

There are hundreds of small programming languages out there, but other popular programming languages include:

那里有数百种小型编程语言,但其他流行的编程语言包括:

  • Python

    Python
  • PHP

    PHP
  • Perl

    Perl
  • Ruby

    Ruby
  • Go

  • Rust

  • Scala

    Scala

There have been many attempts to automate the process of writing and testing programming languages by having computers write computer programs, but the complexity is such that, for now, humans still write and test computer programs.

已经进行了许多尝试,以使计算机编写计算机程序来使编写和测试编程语言的过程自动化,但是由于其复杂性,到目前为止,人们仍在编写和测试计算机程序。

编程语言的未来 ( The Future for Programming Languages )

Computer programmers tend to use programming languages they know. As a result, the old tried-and-true languages have hung around for a long time. With the popularity of mobile devices, developers may be more open to learning new programming languages. Apple developed Swift to eventually replace Objective-C, and Google developed Go to be more efficient than C. Adoption of these new programs has been slow, but steady.

计算机程序员倾向于使用他们所知道的编程语言。 结果,古老的久经考验的语言已经徘徊了很长时间。 随着移动设备的普及,开发人员可能更愿意学习新的编程语言。 苹果公司开发了Swift,最终取代了Objective-C,谷歌开发了Go,使其效率比C高。采用这些新程序的过程虽然缓慢但稳定。

翻译自: https://www.thoughtco.com/what-is-a-programming-language-958332

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值