`
lfx_cool
  • 浏览: 65926 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Scripting Languages 簡介

阅读更多
作者: 朝陽科技大學 資訊管理系 洪朝貴 (本文最新版网址:http://people.ofset.org/~ckhung/b/pr/scripting.php

命令稿語言 scripting language 是什麼? 很難給一個嚴格的定義; 不妨看看最具代表性的幾個例子: perl, python, php, tcl, guile, ruby。 另外, UNIX 上的各種 shells, MS Windows 上的 visual basic, OS/2 上的 rexx 也都可以算是 scripting languages。 用這些語言所寫的程式, 執行的方式都是以解譯 (interpreting) 為主, 執行效率也許不如 C, C++, Java, Pascal, 等以編譯 (compiling) 為主的程式, 但是在研發速度上往往比後者快上數倍。

這些語言最初的用途, 多半在整合系統既有的元件。 如果拿蓋房子做比喻, 傳統編譯語言像是建造公寓時所使用的重機械, 操作起來耗時耗力成本高, 但成品 (一整排制式的公寓) 的使用者多且單價也高; scripting language 像是佈置裝潢時所使用的工具, 操作起來成本低, 但成品 (一間公寓) 的使用者少且單價也低。 再拿大眾運輸做比喻, 傳統編譯語言像捷運 -- 成本高, 客戶多, 利潤高; scripting 像計程車 -- 成本低, 客戶少, 利潤低。

其實現在的 scripting languages 不只可以作高階的整合, 也可以寫低階的程式, 甚且有它自己的編譯器。 再加上 swig 可以替 c 語言寫的函式庫包上與各種 scripting 語言連結的外衣, 所以在許多場合 scripting 語言幾乎已可完全取代傳統的編譯語言。

為何要學 Scripting?
首先, 硬體價格日益降低, 電腦速度日益提高, 人工價格日益昂貴。 種種因素都造成程式研發的速度越來越重要; 程式執行的速度越來越不重要。

更重要的是 軟體自由化的趨勢 即將對資訊業產生很大的衝擊。 過去 C/C++/Java 就業市場需要大量的人力, 是因為寫好一套軟體之後, 不需要修改, 就可以賣給很多人, 所以 (1) 軟體執行的速度必須要快 (2) 軟體公司願意高薪僱用程式設計師 (像不像成本高/利潤高的捷運/制式公寓?) 但是現在 OO.o 開始對 MS Office 造成挑戰; 不論市場佔有率是否真的改變, MS Office 的降價勢在必行。 同樣地, 不論 Linux 是否真能取代 MS Windows, 後者的價格絕對會因前者的挑戰而降低。 試想: 如果全球最大, 壟斷最成功的微軟都被自由軟體逼著降價, 那麼賣資料庫的 Oracle, 賣開發工具的 Borland, 以及其他 靠著賣軟體賺錢 的較小公司, 又如何能不降價? 如果賣軟體不再賺錢, 那麼 C/C++/Java 的就業市場大小又怎能不向下調整? 如果寫 「大眾使用的程式」 不再好賺, 那麼程式設計師的市場自然要向 「小眾化」 「特殊化」 調整。 什麼樣的語言適合拿來寫 "使用人次少" 的軟體? 開發速度快, 執行速度慢的 scripting languages 不正是首選嗎? 我個人認為, 受到自由軟體運動的衝擊, 未來程式設計業的主要工作, 將從生產業/工業 ("大量生產千篇一律的公寓") 逐漸轉為服務業 ("針對客戶個人需求與使用習慣, 量身訂作, 裝潢出一個有特色的環境")。 當然 C/C++/Java 的就業市場不會消失, 例如嵌入式系統之類與硬體結合的工作, 一樣會需要人力。 不過就大趨勢而言, 相信 scripting 的成長空間遠遠超過這些傳統編譯式語言。

更多類似的看法, 請見 Scripting: Higher Level Programming for the 21st Century, Unix as an element of literacy, 及 Death to the Wizards! 等三篇

如何選擇適當的 scripting language?
是否支援各種不同的作業平臺? (cross-platform)
外掛模組是否容易使用與建構? (extensibility)
語言設計是否良好? (嚴謹 vs 寬鬆; 豐富 vs 易學)
上中下層市場 (人力需求/使用人口/既有模組) 是否活潑?
長遠看來, 只要是解譯器原始碼公開的語言 (例如上述各種語言) 都會有持續的發展空間與市場。 再配合搜尋/代換字串用的 regular expression, 支援各種不同語言的 GUI 程式庫 tk, 以及「將既有 C/C++ 程式庫轉換成上述各語言的外掛模組」的工具 swig, 程式設計師可以擺脫朝學夕廢的夢魘, 讓舊的知識不僅保留下來, 而且可以和新的知識發揮相乘的效果。
分享到:
评论

相关推荐

    Scripting in Java Languages, Frameworks, and Patterns

    Therefore, we can conclude that the Java development platform can also benefit from scripting concepts and languages. Java developers can use scripting languages in areas proven to be most suitable ...

    CadScriptingLanguages_skill.pdf

    We will go over the basic command constructs of SKILL scripting language. All examples in this chapter do not involve any database access or library setup. A good way to get a feel of the power of any...

    Scripting in Java 2014

    Scripting in Java starts with the explanation of basic scripting concepts and mechanisms needed for implementating scripting languages on the Java platform. Next, it focuses on particular languages ...

    Mastering Linux Shell Scripting

    Implement functions and edit files using the Stream Editor, script in Perl, program in Python – as well as complete coverage of other scripting languages to ensure you can choose the best tool for ...

    Mastering Linux Shell Scripting.epub

    Implement functions and edit files using the Stream Editor, script in Perl, program in Python – as well as complete coverage of other scripting languages to ensure you can choose the best tool for ...

    Mastering Linux Shell Scripting.mobi

    Implement functions and edit files using the Stream Editor, script in Perl, program in Python – as well as complete coverage of other scripting languages to ensure you can choose the best tool for ...

    Mastering Linux Shell Scripting(PACKT,2015)

    Implement functions and edit files using the Stream Editor, script in Perl, program in Python – as well as complete coverage of other scripting languages to ensure you can choose the best tool for ...

    Mastering Linux Shell Scripting.pdf

    Implement functions and edit files using the Stream Editor, script in Perl, program in Python – as well as complete coverage of other scripting languages to ensure you can choose the best tool for ...

    Python.Scripting.for.ArcGIS.pdf

    Experience with other scripting or programming languages (Perl, VBA, VB script, Java, C++) is helpful but not required. Readers are expected to have good general ArcGIS skills and a basic ...

    Learning Linux Shell Scripting 2nd Edition pdf

    Learning Linux Shell Scripting 2nd Edition pdf Break through the practice of writing tedious code with shell scripts ...Embedding other languages in Scripts Database administration using Shell Scripts

    Linux Shell Scripting Essentials 无水印pdf 0分

    Paperback: 282 pages Publisher: Packt Publishing - ebooks Account (November 23, 2015) ...Execute and embed other languages in your scripts Manage creation, deletion, and search operations in files

    Design Concepts in Programming Languages

    Hundreds of programming languages are in use today--scripting languages for Internet commerce, user interface programming tools, spreadsheet macros, page format specification languages, and many ...

    swigwin-3.0.12.zip

    The list of supported languages also includes non-scripting languages such as C#, Common Lisp (CLISP, Allegro CL, CFFI, UFFI), D, Go language, Java, Lua, Modula-3, OCAML, Octave and R. Also several ...

    脚本语言教程完整详细版

    脚本语言(Script languages,scripting programming languages,scripting languages)是为了缩短传统的编写-编译-链接-运行(edit-compile-link-run)过程而创建的计算机编程语言。虽然许多脚本语言都超越了计算机...

    embedded-scripting-languages:嵌入式脚本语言列表

    嵌入式脚本语言以下是在您的应用程序中使用的相当成熟的开源的列表。 扩展了脚本语言的定义,它还包括实现。 带有强大的copyleft许可证的项目(例如GNU GPL)将应用于您的代码的其余部分,将其作为警告突出显示。...

    Linux Shell Scripting Essentials(PACKT,2015)

    Shell scripting is a quick method to prototype complex applications or problems. Shell scripts are a collection of commands to automate tasks, usually those for which the user has a repeated need, ...

    apress.beginning.apache.cassandra.development.1484201434

    As Java, PHP, Python, and JavaScript are the most commonly used programming/scripting languages, author Vivek Mishra includes complete coverage of accessing Cassandra database with these languages ...

    beginning_portable_shell_scripting_from_novice_to_professional.pdf

    introduction to Shell Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....

Global site tag (gtag.js) - Google Analytics