1 / 13

Smalltalk

Smalltalk. Aaron Bloomfield CS 415 Fall 2005. Evolution of Smalltalk. Alan Kay – grad student at Utah Dynabook Xerox PARC. Influenced by Lisp, Simula, Ivan Sutherland’s Sketchpad, LOGO, Dewey, Montessori, Piaget . Smalltalk. Interpreted Everything is an object

galya
Download Presentation

Smalltalk

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Smalltalk Aaron Bloomfield CS 415 Fall 2005

  2. Evolution of Smalltalk • Alan Kay – grad student at Utah • Dynabook • Xerox PARC. • Influenced by Lisp, Simula, Ivan Sutherland’s Sketchpad, LOGO, Dewey, Montessori, Piaget

  3. Smalltalk • Interpreted • Everything is an object • Dynamically & Strongly Typed • Rich programming environment • Window-oriented display management • Mouse, Menus • Example of a pure Object-Oriented Language

  4. Smalltalk and Squeak • Smalltalk – commercial product • Squeak – free version, used for education

  5. Bindings x <- 3 x <- x + 1 In Squeak, write <-as underscore OR := X is bound to 4

  6. Objects and Messages • Everything is an Object • Everything is done by sending messages to objects x * 2 • Sends the message *2 to the object x.

  7. Other Examples 3 + 2 * 5

  8. Inheritance • Superclass • Subclass • Object • Overriding • No multiple Inheritance

  9. Implementation • Mostly written in Smalltalk • Main loop: true whileTrue: [Display put: user run] Class - userTask run || Keyboard read eval print

  10. Virtual Machine • Storage Manager • Interpreter • Primitive Subroutines

  11. Storage Manager • Collects and manages free space • Handles requests to: • Create new objects • Fetch class of an object • Fetch and store fields of an object • Uses reference counting

  12. Concurrency • Easy to implement • Handy for simulations • Each activation record is a Smalltalk object sched map: [:Task | Task run]

More Related