Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dylan An Object Oriented Dynamic Language. Dylan Overview Short for “Dynamic Langage” General-purpose Object-oriented Attempts to combine functionality.

Similar presentations


Presentation on theme: "Dylan An Object Oriented Dynamic Language. Dylan Overview Short for “Dynamic Langage” General-purpose Object-oriented Attempts to combine functionality."— Presentation transcript:

1 Dylan An Object Oriented Dynamic Language

2 Dylan Overview Short for “Dynamic Langage” General-purpose Object-oriented Attempts to combine functionality of:  Lisp  Smalltalk  C++

3 Why Dylan? Apple's Advanced Technology Group Different people using Lisp, SmallTalk, and C++ Wanted a language to appease all three groups

4 History and Downfall Considered for use with the Apple Newton (the proto- PDA) Kept as general purpose Mac programming language Much work on compilers and IDEs while Dylan still in development.  For Mac by Apple  For Windows by Harlequin  “d2c” compiler for UNIX by CMU Development scrapped in mid-1990s due to budget cuts. Java became popular instead.

5 Dylan: Language Concepts All objects are classes and functions. All objects are “typed”. Garbage Collection

6 Class Definition define class ( ) slot initial-position ::, required-init-keyword: position:; slot initial-velocity ::, required-init-keyword: velocity:; end class;

7 Find Position Function define function find-position-and-velocity (rock ::, time :: )  (position ::, velocity :: ) values(-4.9 * time * time + rock.initial-velocity * time + rock.initial-position, -9.8 * time + rock.initial-velocity); end function;

8 Print Function define function print-position-and-velocity (rock ::, time :: )  () let (p, v) = find-position-and-velocity(rock, time); format-out("Position: %=m, Velocity: %=m/s\n", p, v); end function;

9 Use of Class and Functions define variable *rock* = make(, position: 10.0, velocity: 0.0); print-position-and-velocity(*rock*, 1.0); *rock*.position := “5.0”; position(*rock*) := “5.0"; position-setter(“5.0", *rock*);

10 Dylan vs C++ Dylan as a number of features that distinguish it from C++ including: automatic memory management clean, consistent syntax fully and consistently object-oriented model dynamic as well as static type checking support for incremental compilation first-class functions and classes

11 Dylan vs Java Dylan already has solutions to the Javas problems: multiple implementation inheritance multiple argument method dispatch pure object types no casting required extensible syntax good iteration/collection integration


Download ppt "Dylan An Object Oriented Dynamic Language. Dylan Overview Short for “Dynamic Langage” General-purpose Object-oriented Attempts to combine functionality."

Similar presentations


Ads by Google