What's the difference between a “script” and an “application”?

前端 未结 20 2021
南旧
南旧 2020-12-04 14:53

I\'m referring to distinctions such as in this answer:

...bash isn\'t for writing applications it\'s for, well, scripting. So sure, your application m

相关标签:
20条回答
  • 2020-12-04 15:21

    A scripting language doesn't have a standard library or platform (or not much of one). It's small and light, designed to be embedded into a larger application. Bash and Javascript are great examples of scripting languages because they rely absolutely on other programs for their functionality.

    Using this definition, a script is code designed to drive a larger application (suite). A Javascript might call on Firefox to open windows or manipulate the DOM. A Bash script executes existing programs or other scripts and connects them together with pipes.


    You also ask why not scripting languages, so:

    Are there even any unit-testing tools for scripting languages? That seems a very important tool for "real" applications that is completely missing. And there's rarely any real library bindings for scripting languages.

    Most of the times, scripts could be replaced with a real, light language like Python or Ruby anyway.

    0 讨论(0)
  • 2020-12-04 15:23

    A script tends to be a series of commands that starts, runs, and terminates. It often requires no/little human interaction. An application is a "program"... it often requires human interaction, it tends to be larger.

    0 讨论(0)
提交回复
热议问题