Smalltalk - PowerPoint PPT Presentation

About This Presentation
Title:

Smalltalk

Description:

Alan Kay designed and build the first OOP-based personal Computer called FLEX in ... In 1972 Alan Kay and other and XEROX PARC Created Smalltalk 72 with roots ... – PowerPoint PPT presentation

Number of Views:119
Avg rating:3.0/5.0
Slides: 16
Provided by: ValuedGate963
Category:
Tags: alan | smalltalk

less

Transcript and Presenter's Notes

Title: Smalltalk


1
Smalltalk
  • Mark Colangelo
  • CMSC-631, Fall 2002
  • 10 December 2002

2
History of Smalltalk
  • Alan Kay designed and build the first OOP-based
    personal Computer called FLEX in 1967-68
  • In 1967 Simula 67 was designed
  • In 1972 Alan Kay and other and XEROX PARC Created
    Smalltalk 72 with roots tied to Simula 67
  • Followed by Smalltalk 76 (Completely OOPL)
  • Followed by Smalltalk 80 which became available
    as the first commercial release of Smalltalk

3
Smalltalk in the Real World
  • Financial
  • Chubb
  • Chrysler
  • Dunn and Bradstreet, several other
  • Manufacturing and Engineering
  • Texas Instruments
  • Romax (Simulation Software)

4
Free Implemenations of Smalltalk
  • Squeak (Smalltalk for Win , Mac and others)
  • http//www.squeak.org/download/index.html
  • GNU Smalltalk (Unix systems only)
  • http//www.gnu.org/software/smalltalk/smalltalk.ht
    ml

5
Installation of Squeak
  • Installation of Squeak is trivial
  • Download zip file
  • Squeak3.2.image
  • Squeak3.2.changes
  • SqueakV3.sources
  • Squeak VM for your system, version 3.2
  • Doubleclick Squeak image. No other installation
    is required

6
Squeak Install Files
7
Squeak Desktop
8
Hello World
9
Exending Hello World
  • hello
  • 1 to 3 do i (Transcript show 'Hello
    World') cr
  • Gives
  • Hello World
  • Hello World
  • Hello World

10
Adding Logic to Hello World
  • hello times
  • (times gt 100)
  • ifTrue Transcript show 'You will get
    bored!' ifFalse 1 to times do i
    (Transcript show 'Hello World') cr

11
Final Hello World
  • hello times say text
  • (times gt 100)
  • ifTrue Transcript show 'You will get
    bored!' ifFalse 1 to times do i
    (Transcript show text) cr

12
Syntax Observations
  • Any variable can store any object. Object keeps
    track of what it is.
  • Could pass an integer into the text parameter.
    No error until the Transcript tried to show it.

13
Messaging
  • Always pass messages to an object
  • the colon syntax for parameter passing looks a
    lot like the colon syntax for loops--and logic,
    for that matter. That's because it's exactly the
    same.
  • hellosay, ifTrueifFalse and todo are all
    messages.

14
Blocks of Code are Objects
  • i (Transcript show text) cr is an object
  • Code block can be passed as an argument to todo
  • Transcript is a global variable that contains an
    object which understands the show message.
  • In addition to show, the Transcript object
    understands the message cr, which puts a newline
    in the Transcript window.

15
References
  • Smalltalk home page
  • www.smalltalk.org
  • Squeak home page
  • www.squeak.org
  • Smalltalk Industry Council home page
  • www.whysmalltalk.com
Write a Comment
User Comments (0)
About PowerShow.com