问题描述
假设有几个项目主要由聪明的实习生维护,他们在一段时间后最终离开.脚本在关键部分到处使用,例如,备份数据库、重命名它、压缩它、将它移动到 ssh 上、解压缩它,然后用不同的设置恢复它.你知道,脚本编写的东西.
Suppose there were several projects mostly maintained by smart interns, who eventually leave after a period of time. Scripts are used here and there in key parts, for example, to back up a database, rename it, zip it, move it over ssh, unzip it, and then to restore it with different settings. You know, the scripting stuff.
应用端的编程语言已经设置,但脚本的编程语言已经放宽.目前可能有 bash 和 .bat 文件的健康组合,也许还有一些 Perl.
The programming languages for the application side is set, but those for scripts have been relaxed. Currently there are probably healthy mix of bash and .bat file, and maybe some Perl.
1) 为了避免语言泛滥,以及 2) 因为我不想强迫未来的 Windows 程序员使用 bash,我想设置一个官方"脚本语言.
1) To avoid language proliferation, and 2) because I don't want to force bash upon future Windows programmers, I'd like to set an "official" scripting language.
Google 为此选择了 Python,它以可读性强、易于学习和拥有良好的库而闻名;但是,我个人认为与类似 C 的语法、Pascal 或 Ruby 相比,它的可读性并不强.
Google picked Python for this, and it's famous for being readable, easy to learn, and having good library; however, I personally don't find it that readable compared to C-like grammar, Pascal, or Ruby.
无论如何,如果您被迫在 Windows 机器上只使用一种脚本语言(如果您愿意,可以使用 Cygwin)来编写所有脚本,您希望它是什么,为什么?
In any case, if you were to be forced to use only one scripting language on a Windows machine (with Cygwin if you want to) for all scripting, what would you like it to be, and why?
相关宗教战争:
推荐答案
PowerShell - 从头开始设计为一种 Windows 脚本语言,它可以连接到 CLR 以获得高级功能.
PowerShell - designed from the ground up to be a Windows scripting language, and it can hook into the CLR for advanced functionality.
(是的,我意识到这不能在 cygwin 下运行......但为什么这是一个要求?)
(yes, I realize this doesn't run under cygwin... but why is that a requirement?)
这篇关于最佳“官方"Windows 程序员的脚本语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!