Object-oriented Scripting

Avi Kak, Professor, Purdue Univ, Purdue University

Track: Programming
Date: Monday, July 24
Time: 8:30am - 12:00pm
Location: D139-140

This tutorial, based on award-winning courses at Purdue University, will review the object-oriented features of Perl and Python. The examples and the explanations that will be presented have been tried and tested on students over several years. Since the instructor is a great believer in the power of comparative learning, the teaching style will be comparative over Perl and Python.

After a brief recap of the basic syntax of the languages, the tutorial will focus on the following topics:

  1. the concept of a class
  2. designing constructors
  3. syntax for writing methods
  4. specifying inheritance
  5. how the search is carried out in the inheritance tree
  6. method resolution order for the new-style Python classes
  7. extending the built-in types in Python
  8. memory-allocation for the new-style classes in Python
  9. abstract classes in Perl and Python
  10. raising exceptions in Perl and Python.

The tutorial will also review specific well-known object-oriented modules in Perl and Python. Examples shown will be drawn from scripting for GUI and for networking.