LISP and the Common Lisp Object System CLOS - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

LISP and the Common Lisp Object System CLOS

Description:

LISP and the Common Lisp Object System (CLOS) Ron Ferguson. College of Computing ... LISP is really, really cutting-edge. Garbage collection. Functional programming ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 9
Provided by: rwf
Category:
Tags: clos | lisp | clos | common | lisp | object | system

less

Transcript and Presenter's Notes

Title: LISP and the Common Lisp Object System CLOS


1
LISP and the Common Lisp Object System (CLOS)
  • Ron Ferguson
  • College of Computing
  • rwf_at_cc.gatech.edu
  • http//www.cc.gatech.edu/faculty/Ron.Ferguson

2
LISP is really, really old
  • 1959
  • Lambda calculus
  • Syntax? Parentheses
  • Manipulation of list structures
  • Equivalence of programs and data
  • Slow? Interpreted?

3
LISP is really, really cutting-edge
  • Garbage collection
  • Functional programming
  • Extremely powerful macro facility - Why
    write a program when you can write a
    whole new language? - Roll-your-own
    control structures
  • Compiles down to fast executable - Type
    specifications are optional
  • Used for real applications Orbitz and
    YahooStores

4
First ANSI OOP Language?
  • C? Java?
  • LISP
  • ANSI Common Lisp Object System
  • Previous LISP Flavors, LOOPS
  • Fully object-oriented
  • Includes meta object layer
  • Spec available online
  • http//www.lispworks.com/reference/HyperSpec/
  • http//www-2.cs.cmu.edu/Groups/AI/html/cltl/cltl2.
    html
  • Multiple free implementations
  • See http//www.alu.org

5
Creating a simple OOP system in LISP
  • Miniature version of classes in GeoRep, an
    existing LISP system
  • Qualitative spatial reasoning
  • Diagrams
  • Begin with a few simple class definitions

6
Defining classes in LISP
  • Lets go right to the system (Franz Allegro
    Common Lisp)

7
Lessons
  • Create classes using DefClass
  • For each slot, tell the system how it should be
    handled
  • The system will create a set of constructor and
    accessor functions
  • Use generic methods to specialize functionality
    for a class
  • Special methods such as printing
  • Use for effects like lazy evaluation

8
How to learn more
  • Guy Steeles Common LISP
  • Anything by Paul Graham
  • Association of Lisp Users http//www.alu.org.
  • LISP Summer Camp
  • Keep eye on my web site
  • May accept a few undergrads this year
Write a Comment
User Comments (0)
About PowerShow.com