“脚本"和“脚本"之间有什么区别?和“应用程序"? [英] What's the difference between a "script" and an "application"?

查看:44
本文介绍了“脚本"和“脚本"之间有什么区别?和“应用程序"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我指的是区别,例如 这个答案:

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

...bash 不是用于编写应用程序,而是用于编写脚本.可以肯定的是,您的应用程序可能有一些内务处理脚本,但不要去编写 critical-business-logic.sh,因为另一种语言可能更适合此类内容.

...bash isn't for writing applications it's for, well, scripting. So sure, your application might have some housekeeping scripts but don't go writing critical-business-logic.sh because another language is probably better for stuff like that.

作为接触过多种语言的程序员,这似乎是C、Java等编译语言的势利.我不是在寻求强化我的观点或手挥式的答案.相反,我真的想知道所提及的技术差异是什么.

As programmer who's worked in many languages, this seems to be C, Java and other compiled language snobbery. I'm not looking for reenforcement of my opinion or hand-wavy answers. Rather, I genuinely want to know what technical differences are being referred to.

(我在日常工作中使用 C,所以我不仅仅是在防御.)

(And I use C in my day job, so I'm not just being defensive.)

推荐答案

传统上是编译程序并解释脚本,但这已经不再重要了.如果您真的愿意,您可以生成大多数脚本的编译版本,而其他编译"语言(如 Java)实际上是解释性的(在字节码级别).

Traditionally a program is compiled and a script is interpreted, but that is not really important anymore. You can generate a compiled version of most scripts if you really want to, and other 'compiled' languages like Java are in fact interpreted (at the byte code level.)

更现代的定义可能是程序旨在供客户(可能是内部程序)使用,因此应包括文档和支持,而脚本主要供作者使用.

A more modern definition might be that a program is intended to be used by a customer (perhaps an internal one) and thus should include documentation and support, while a script is primarily intended for the use of the author.

网络是一个有趣的反例.我们都喜欢使用 Google 搜索引擎查找内容.用于创建它所引用的数据库"的大部分代码仅供其作者和维护者使用.这使它成为脚本吗?

The web is an interesting counter example. We all enjoy looking things up with the Google search engine. The bulk of the code that goes into creating the 'database' it references is used only by its authors and maintainers. Does that make it a script?

这篇关于“脚本"和“脚本"之间有什么区别?和“应用程序"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆