8
Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott

Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott

Embed Size (px)

DESCRIPTION

Scripting Languages Stress flexibility, rapid development, local customization and dynamic (run-time) checking Embrace high-level concepts like tables, patterns, lists and files Often used as “glue” to connect useful components from other languages More recently, includes scripting capabilities to add dynamic behavior to the web

Citation preview

Page 1: Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott

Scripting LanguagesInfo derived largely from Programming

Language Pragmatics, by Michael Scott

Page 2: Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott

Conventional Languages•Stress efficiency, maintainability,

portability, static detection of errors

Page 3: Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott

Scripting Languages•Stress flexibility, rapid development, local

customization and dynamic (run-time) checking

•Embrace high-level concepts like tables, patterns, lists and files

•Often used as “glue” to connect useful components from other languages

•More recently, includes scripting capabilities to add dynamic behavior to the web

Page 4: Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott

Common characteristics• Often includes interactive (interpreted) use• Tend to be more concise

▫System.out.println(“hello”);▫puts “hello”

• Minimize or eliminate declarations• Simple scoping rules

▫Some are global by default (e.g., Perl)▫Some are local by default (e.g., PHP)▫Scoping rules vary widely

• Most are dynamically typed

Page 5: Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott

Common characteristics*, cont.•Tend to have more direct access to OS

functions•Often rely on pattern matching and

flexible string manipulation•Build high-level types (e.g., sets, maps,

etc.) into semantics of language itself (not just in libraries)

* capabilities also in traditional languages, but not as simple to access

Page 6: Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott

What do we use them for? (domains)•Command languages (e.g., bash) often

manipulate files, argument and commands. Includes options like redirection, piping, execution, simple data types (e.g., string). Text processing (e.g., sed, awk) common… think of patterns in file names, etc.

•Mathematics and statistics▫Maple, Mathematica, Matlab, R▫Provide support for numerical methods,

symbolic math, data visualization, modeling

Page 7: Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott

Domains, continued•General purpose

▫Perl, Tcl, Python, Ruby•Extension languages

▫Allow users to create new commands▫AutoCAD, Maya, Director, Flash have

scripting languages▫GIMP can be scripted in Scheme, Tcl,

Python, Perl and others

Page 8: Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott

Domains, continued•Web

▫Server side, such as PHP, CGI▫Client side, such as JavaScript