SlideServe
Menu
Préférences
© SlideServe · v2026

Scripting Languages

lawrencia avatar
13 diapositives · 387 Views · Jan 29, 2013

Dive into the world of scripting languages with their dynamic typing, object-oriented structures, memory management, and dynamic code creation. Understand how they differ from compiled languages and their impact on rapid development.

Scripting Languages - slide 1
01 / 13Scripting Languages
1 / 17

Télécharger la présentation

Scripting Languages
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Scripting Languages CIS*2450 Advanced Programming Concepts

  2. Scripting Languages • Scripting languages are generally interpreted instead of compiled. • Immediate execution allows for rapid development and change. • “Easy to learn” and have support for high-level structures and libraries. • Much of the initial work for many applications has been done and is available in libraries. • Structures such as lists and dictionaries usually builtin

  3. Scripting Languages • Python uses combination of compilation and interpretation: • The source code is converted to an intermediate form called byte code in a step similar to compilation. • The byte code is executed by an interpreter. • This improves performance over purely interpreted systems.

  4. Source Source Source Compiler Interpreter Compiler Executable Execution Byte Code Interpreter Run Execution Execution Compiled Execution Interpreter Execution Byte Code Execution

  5. Scripting Languages • Scripting languages are often used to combine the functionality of other programs. • They act as glue. • This allows the script to act as the intermediary between programs and pass information between them.

  6. Extending • External programs can be used to increase the functionality of the scripting language by binding existing programs to it • This is called extending. • This allows function calls to be made directly to the compiled programs instead of through command interface (stdin/stdout)

  7. Dynamic Typing • Scripting languages often support dynamic typing. • The system manages the types of variables without the programmer’s explicit input on matters of length and type declarations. • Some languages treat all variables as strings and modify them when non-string operations occur with the variable.

  8. Dynamic Typing • This can lead to type mismatches when a variable is assigned a type that is not expected. • It can also cause problems if a variable name is misspelled. • Results in two different variables existing when only one was intended.

  9. Memory Management • Automatic memory management controls the allocation and freeing (garbage collection) of memory on demand. • Objects can grow and shrink as needed and are removed when no longer necessary.

  10. Object-Oriented • Many scripting languages are starting to adopt object-oriented structures. • Traditional scripting languages tend to become difficult to manage when used to write larger programs and the inclusion of OO is an attempt to address the problem. • E.g. Python, incrTCL, Object Oriented Perl

  11. OO and Python • Python supports most OO concepts: • Ability to create multiple name spaces (scope). • Each object contains its own name space. • Polymorphism • Methods change based on their class. • Operator Overloading • Operators given multiple meanings. • Multiple Inheritance • A class can be the product of multiple parents.

  12. Dynamic Code Creation • Many scripting languages can dynamically create and execute code during the execution of the script. • This generally cannot be done by a non-scripting language. a = 10 x = “print a” exec(x)

  13. Data Structures • Most modern scripting languages have built-in support for high level data structures. • Associative arrays • Also called dictionaries or hash tables. • Lists