脚本语言和编程语言的区别_编程语言和脚本语言之间的区别

脚本语言和编程语言的区别

A programming language is a language used to write set of instructions to perform a task or to get an output from it, whereas Scripting language have comparatively small set of instructions which is used to produce different kinds of outputs which can be combined to some other program to perform a task. Scripting languages is a subset of programming languages.

编程语言是一种用于编写指令集以执行任务或从中获得输出的语言,而脚本语言具有相对较小的指令集,该指令集可用于生成可以组合到某些其他程序的各种输出执行任务。 脚本语言是编程语言的子集。

The basic difference between both is that programming languages are compiled whereas scripting languages are interpreted, and the programming languages run independently but scripts do not. The deciding factor of the differences between these two is the environment on which they are used.

两者之间的基本区别在于,编程语言是编译的,而脚本语言是解释的,而编程语言是独立运行的,而脚本则不是。 两者之间差异的决定因素是使用它们的环境。

Initially, the programming languages were used to develop software/applications like Microsoft Excel, PowerPoint, Microsoft Word for example, but when the need to add new functionalities to these existing programs arose, then the need for scripting languages came into existence.

最初,编程语言用于开发软件/应用程序,例如Microsoft Excel,PowerPoint,Microsoft Word,但是当需要向这些现有程序中添加新功能时,就出现了脚本语言的需求。

编程语言与脚本语言 (Programming Language vs Scripting Language)

Programming LanguagesScripting Languages
Set of instructions to produce various types of outputs to automate a certain task.Set of instructions to combine the outputs with different outputs to perform a task.
Compilation is necessary.No need for compilation.
Not interpreted.Interpretation is required.
Full- length code.Small chunks of code.
Self-executable, no host is required.Dependent on some other platform, host is required.
Runs independently.Needs to be embedded to existing parent program.
Creates an .exe file.Does not create .exe file
Used in Application/Software development.Used in web development.
Time taken is more because of code being full-fledged.Lesser time is taken because these are only small pieces of code.
编程语言 脚本语言
一组指令,用于产生各种类型的输出以自动执行特定任务。 一组指令,用于将输出与不同的输出组合以执行任务。
编译是必要的。 无需编译。
不解释。 需要解释。
完整代码。 一小段代码。
可自行执行,不需要主机。 依赖于其他平台,主机是必需的。
独立运行。 需要嵌入到现有的父程序中。
创建一个.exe文件。 不创建.exe文件
用于应用程序/软件开发。 用于Web开发。
由于代码成熟,因此花费的时间更多。 花费较少的时间,因为它们只是一小段代码。

The detailed differences between programming languages and scripting languages are:

编程语言和脚本语言之间的详细区别是:

  • Programming languages use a compiler to first convert the high level language to machine level language in one go whereas, Scripting languages do not need a compiler and they use an interpreter for line by line conversion.

    编程语言使用编译器首先将高级语言一次转换为机器级语言,而脚本语言则不需要编译器,并且它们使用解释器进行逐行转换。
  • Programming languages are compiled so they do not need to be interpreted by some other host, whereas, Scripts are interpreted with another program. For example: JavaScript is used within HTML and then interpreted by browser which is the host for it.

    程序语言是经过编译的,因此它们不需要由其他主机解释,而脚本由其他程序解释。 例如:JavaScript在HTML内使用,然后由浏览器解释为它的宿主。
  • Programming is a full-fledged code whereas script is a piece of code.

    编程是完整的代码,而脚本是一段代码。
  • Any development can be done from scratch by using programming languages whereas,

    可以使用编程语言从头开始进行任何开发,而
  • Scripting languages are used to perform any specific task and gets combined to already existing programs.

    脚本语言用于执行任何特定任务,并与现有程序结合在一起。
  • Programming languages are self-executable and run independently, whereas, A script gets combined to a parent program to make a specific task easier.

    编程语言是可自行执行的,并且可以独立运行,而脚本可以组合到父程序中,从而使特定任务更加容易。
  • The time taken to write a code using programming languages is relatively more because we need detailed line of code for each function whereas, A script is short and specific because it is only used to perform any function and will embed into some other host taking lesser time to write.

    使用编程语言编写代码所花的时间相对较多,因为我们需要为每个功能编写详细的代码行,而脚本又短又具体,因为该脚本仅用于执行任何功能,并且可以以较少的时间嵌入到其他主机中来写。
  • An executable file can be created using a programming language, whereas, A script does not create any .exe file.

    可执行文件可以使用编程语言创建,而脚本不会创建任何.exe文件。
  • Programming languages are categorized into: First, Second, Third, Fourth and Fifth Generation, whereas, Scripting languages are only divided into two categories: Server-side scripting languages and client-side scripting languages.

    编程语言可分为:第一代,第二代,第三代,第四代和第五代,而脚本语言仅分为两类:服务器端脚本语言和客户端端脚本语言。
  • Programming languages are primarily used for application development, whereas, Scripting languages are used to write code to perform any function in web development.

    编程语言主要用于应用程序开发,而脚本语言用于编写代码以执行Web开发中的任何功能。
  • Examples: Programming languages: C, C++, Java, C#, Scripting languages: JavaScript, PHP, VBScript, Perl, Python.

    示例:编程语言:C,C ++,Java,C#,脚本语言:JavaScript,PHP,VBScript,Perl,Python。

Note: Python is a programming language which is also used for scripting. It is basically a programming language but is used as a scripting language to write code to automate a certain process in a specific environment.

注意 :Python是一种编程语言,也用于编写脚本。 它基本上是一种编程语言,但用作脚本语言来编写代码以在特定环境中自动执行特定过程。

Conclusion

结论

The execution time and complexity are basically the differentiating factors for programming languages and scripting languages. The difference between programming languages and scripting languages mainly depends on the environment being used and the process of execution.

执行时间和复杂度基本上是编程语言和脚本语言的差异化因素。 编程语言和脚本语言之间的区别主要取决于所使用的环境和执行过程。

Although, the difference between both is getting almost negligible nowadays due to the advanced and improved practices that are coming into existence.

尽管由于当今已经存在的先进和改进的实践,两者之间的差异几乎可以忽略不计。

翻译自: https://www.thecrazyprogrammer.com/2020/03/difference-between-programming-language-and-scripting-language.html

脚本语言和编程语言的区别

  • 7
    点赞
  • 30
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值