Advantages of scripting compared to system languages
Some advantages of scripting, compared to system-level languages: - Faster
development
Scripts
take much less time to write than system code. The programmer must do less housecleaning as the script platform handles most of the tedious memory and data problems. See Table.
- Safer
The
script environment protects against programming bugs, as in this divide-by-zero example where dividing by zero would crash most systems, but is caught by the scripting system.
- Greater Security
All
calls in a script environment must pass through the script environment, which can then impose any level of security on the code. Most script languages offer a security model with a huge variety of security options. Nombas takes this to the logical extreme with its scripted security, meaning the user can write a security manager in the JavaScript language itself, as seen in this Multi-App/Security Demo wherein the final applet may be prevented from dangerous calls directly to the OS.
- Fewer bugs - Easier to debug
Run-time
evaluation and system independence make debugger implementation very easy, as in this debugger example.
- Flexible gluing
Ideal
scripting solutions glue existing components together. See following page for examples.
- Smaller code
A
single line of scripting code often accomplishes many lines of system-level code. See Graph and Table.
- Faster to market, smaller, cheaper
RAD
nirvana, at last.
Mandatory reading: Scripting: Higher Level Programming for the 21st Century, by John K. Ousterhout of Sun Microsytems. This paper describes the advantages of scripting better than I ever could. The paper talks mostly about Tcl, but the principles apply just as well to any of the scripting languages.
Scripting
fulfills most of the RAD goals that have been sought over the years. When programmer time is more valuable than the CPU time, scripting is a time and money saver. |