Introduction to
Integrative Programming
and Technologies
Programming vs Scripting
Programming Languages: Basic
Concepts
Language Processors: Assembler, Compiler, Interpreter
• a special translator system software that translates a source code (i.e., a high-
level program) into machine code (i.e., object code)
Source code (high- Object code
Language processor
level language) (machine language)
Programming Languages: Basic
Concepts
Compiler: reads an entire high-level language source code and
translates to object code. The translation (aka. compilation) is
successful if the source code is free from errors. Execution happens
even without the source code.
• e.g., C, C++, C#
Assembler: translates an Assembly Language source code to object
code.
Interpreter: translates and directly executes a source code line by line,
halts execution at the line of error.
• e.g., Perl, Python
Programming Languages: Basic
Concepts
Compiled vs Interpreted Language
Compiled Language Interpreted Language
-Translates entire source code into executable -Directly executes the source code line by line,
machine code (object code) no object code generated
-Error messages are generated only after -Debugging is comparatively easier since the
scanning the entire source code, debugging is error is located at where execution halts
hard since errors can be found anywhere in the
source code
-Repeat translation of the entire source code is -The interpreter halts execution at the line of
necessary when error in the source is detected error (showing an error message) and
continues execution on to the next line when
the error is corrected
Programming Languages: Basic
Concepts
Compiled vs Interpreted Language
Compiled source codes run faster than interpreted ones. However, this
speed distinction is getting blurred through improved computation
capabilities of modern hardware and advance coding practices.
Programming Languages: Basic
Concepts
Application vs Scripting Language
Application (Programming) Language Scripting Language
Formal language for combining set of computing Supports scripts, which are programs written
instructions to generate an output solely for a certain runtime environment to
perform a specific function
Compiled (e.g., C, C++) Interpreted, no need to compile (e.g., JavaScript,
VBScript)
Runs independently of a parent program Runs within another program
Designed to facilitate standalone code and Designed for simpler and faster coding
software development, gives full usage of the
language
Programming Languages: Basic
Concepts
Application vs Scripting Language
Application (Programming) Language Scripting Language
Takes longer development time since more Less development time since fewer lines are
lines are required for a certain function written for a certain function
Subcategories: 1st gen, 2nd gen, 3rd gen, 4th Subcategories: server-side scripting, client-
gen, 5th gen side scripting
Translation: entire program (one-shot Translation: line by line
translation)
Hosting: self-executable, no host needed Hosting: requires a host program
Programming Languages: Basic
Concepts
Application vs Scripting Language
Application (Programming) Language Scripting Language
Speed: since compiled, codes are analyzed all at Speed: since interpreted, codes and errors are
once, errors are reported collectively analyzed line by line
Complex syntax and semantics Simple, executed from start to finish as a “script”
Examples: C, C++, C#, Java, Basic, COBOL, Pascal Examples: JavaScript, Perl, PHP, Python, Ruby
Overall, the primary differentiating factors between programming and
scripting languages are the execution process and the execution
environment
More characteristics of scripting
languages
• Most scripting languages dispense of declarations
• Simple rules to govern scopes of names (identifiers)
• In Perl, every name is global by default
• In Tcl and PHP, everything is local by default
• In Python, any variable that is assigned a value is local to the block in which
the assignment appears
• Scripting languages have exceptional facilities for pattern matching,
searching and string manipulation
More characteristics of scripting
languages
• Provides high level data types such as sets, bags, dictionaries, lists and
tuples which are some of the very convenient features of scripting
languages
• e.g., in Python a dictionary can map a key to a value:
dict([(x, x**2) for x in (2, 4, 6)])
{2: 4, 4: 16, 6: 36}
Code (Program) vs Script
• Java • Python
Programming Languages: Basic
Concepts
Application vs Scripting Language
Therefore, a scripting language is a programming language, but NOT
ALL programming languages are scripting language.
Programming languages are used to develop applications (i.e., systems
programming), scripting languages are used to write codes to easily
control the dynamic behaviour of applications.