Prototype Languages

872 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
872
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Prototype Languages

  1. 1. Self ”More Smalltalk than Smalltalk” Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 13: Prototype Languages December 21, 2010 2/7
  2. 2. Self ”More Smalltalk than Smalltalk” Goal: to simplify the language as much as possible Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 13: Prototype Languages December 21, 2010 2/7
  3. 3. Results Fields and methods are slots Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 13: Prototype Languages December 21, 2010 3/7
  4. 4. Results Fields and methods are slots No classes, only cloning and modification Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 13: Prototype Languages December 21, 2010 3/7
  5. 5. Results Fields and methods are slots No classes, only cloning and modification Dynamic inheritance Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 13: Prototype Languages December 21, 2010 3/7
  6. 6. Dynamic Inheritance Some slots may be marked parent slots. Lookup algorithm traverses these slots. Even when invoking a method found in a different object, the receiver does not change. Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 13: Prototype Languages December 21, 2010 4/7
  7. 7. The Little DifferencesSee the following patterns: singleton, proxy, chain of responsibility, stateand strategy. Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 13: Prototype Languages December 21, 2010 5/7
  8. 8. Let’s Look at Dynamic Inheritance Once More How is it different from composition? Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 13: Prototype Languages December 21, 2010 6/7
  9. 9. Let’s Look at Dynamic Inheritance Once More How is it different from composition? How is it different from ”static” inheritance? Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 13: Prototype Languages December 21, 2010 6/7
  10. 10. Let’s Look at Dynamic Inheritance Once More How is it different from composition? How is it different from ”static” inheritance? Perhaps there exists a concept generalizing both? Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 13: Prototype Languages December 21, 2010 6/7
  11. 11. SeeJames Noble and Brian Foote. Attack of the clones. In Proceedings ofthe 2002 conference on Pattern languages of programs - Volume 13(CRPIT ’02) (2002), 99–114. Michal P´se (CTU in Prague) ıˇ Object Programming Lect. 13: Prototype Languages December 21, 2010 7/7

×