3A-1 1 Introduction to Smalltalk History of Smalltalk The philosophy of Smalltalk:  “...we have a universe of well-behaved objects that courteously ask.

Slides:



Advertisements
Similar presentations
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Advertisements

Portability and Safety Mahdi Milani Fard Dec, 2006 Java.
CS 331 Programming LanguagesDate: 4/21/08 Object Oriented Programming Group Featuring: James Webber II Topics Include: OOPSmalltalk.
Lab#1 (14/3/1431h) Introduction To java programming cs425
Java.  Java is an object-oriented programming language.  Java is important to us because Android programming uses Java.  However, Java is much more.
Client Side Programming Using Java Applet Outcomes: You will be expected to know: – Java Applets and HTML file; –bytecode and platform independent programs;
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
Exploring the iPhone SDK Toyin Adedokun & Daniel Laughlin.
High-Level Programming Languages
PZ06BX Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ06BX - Introduction to Smalltalk Programming Language.
SMALLTALK Presented By Kameron Ethridge Sheree Martin Cassandra Void Michael Williams.
Principles of Object-oriented Programming Programming Language Paradigms August 26, 2002.
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
Chapter 8 High-Level Programming Languages Nell Dale John Lewis.
Object-oriented programming and design 1 Smalltalk in a Nutshell Objects & classes Messages & methods Inheritance & metaclasses.
12. A bit of Smalltalk. © O. Nierstrasz P2 — A bit of Smalltalk 11.2 Roadmap  Some history  Smalltalk syntax & object model  The Smalltalk environment.
SMALLTALK Presented by Latasha Gibbs, Natasha Harrison, and Robert G. Lewis “Common languages are tools, Smalltalk is a piece of art.”
CSE341: Programming Languages Introduction To Ruby; Dynamic OOP; "Duck Typing" Alan Borning Autumn 2012 (slides borrowed from Dan Grossman)
CSCI-383 Object-Oriented Programming & Design Lecture 15.
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
Introduction to Ruby CSE 413 Autumn 2008 Credit: Dan Grossman, CSE341.
Smalltalk Andy Ko Johnvic Dualan Aaron Israel John John Llenteng Jehrom Christian De Vera Carlo Alvarez Michael John Butuyan.
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
Chapter 8 High-Level Programming Languages (modified by Erin Chambers)
High-Level Programming Languages: C++
INTERNET APPLICATION DEVELOPMENT For More visit:
CIS Computer Programming Logic
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
CSE 3302 Programming Languages Chengkai Li Spring 2008 Object-Oriented Programming Lecture 13 – OO Programming, Spring CSE3302 Programming Languages,
 2003 Joel C. Adams. All Rights Reserved. Calvin CollegeDept of Computer Science(1/10) An Overview of Objects and the Java API Joel Adams and Jeremy Frens.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
Computer Programming 12 Mr. Jean March 19 th, 2013.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
Advanced Programming Collage of Information Technology University of Palestine, Gaza Prepared by: Mahmoud Rafeek Alfarra Lecture 2: Major Concepts of Programming.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Basics of Java IMPORTANT: Read Chap 1-6 of How to think like a… Lecture 3.
C H A P T E R T E N Event-Driven Programming Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
Smalltalk for Unix & W i n d o w s Dennis Smith Cherniak Software Development Corporation.
SNPL1 Woochang Lim What (Variable) + How (Function) = Object Objects are the physical and conceptual things we find in the universe around us. Object-Oriented.
Smalltalk (and Squeak) Aida Dungan and Rick Shreve.
Chapter 12 Support for Object oriented Programming.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 20: Objects I invented the term Object-
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
Squeak and Botkit-Port Jeff Forbes Joel Miller. Introduction ● Squeak is a pure OO language ● Based off of SmallTalk-80 – Designed at Xerox PARC by Alan.
The course. Description Computer systems programming using the C language – And possibly a little C++ Translation of C into assembly language Introduction.
CS2204: Introduction to Unix January 19 th, 2004 Class Meeting 1 * Notes adapted by Christian Allgood from previous work by other members of the CS faculty.
8-1 Compilers Compiler A program that translates a high-level language program into machine code High-level languages provide a richer set of instructions.
Smalltalk Mark Colangelo CMSC-631, Fall December 2002.
Introduction to UNIX CS 2204 Class meeting 1 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
CPS120: Introduction to Computer Science Variables and Constants.
Textbook C for Scientists and Engineers © Prentice Hall 1997 Available at NUS CO-OP at S$35.10.
Programming Language Concepts (CIS 635) Elsa L Gunter 4303 GITC NJIT,
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 22: Objectifying Objects.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
Alan Kay The Father of Object-Oriented Programming Chris Rees.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Introduction CMSC 202 Fall Instructors Mr. Ryan Bergeron – Lecture Section 01 Tues/Thu 1:00 – 2:15 am, Sondheim 111 – Lecture Section 04 Tues/Thu.
PHP using MySQL Database for Web Development (part II)
Class 22: Inheritance CS150: Computer Science University of Virginia
What Is a Program? A program is like an algorithm, but describes a process that is ready or can be made ready to run on a real computer Retrieved from:
Aaron Bloomfield CS 415 Fall 2005
Programming Languages 2nd edition Tucker and Noonan
Introduction to Smalltalk
Intro to PHP.
(Computer fundamental Lab)
Let’s Talk about… Smalltalk.
CSE 3302 Programming Languages
Presentation transcript:

3A-1 1 Introduction to Smalltalk History of Smalltalk The philosophy of Smalltalk:  “...we have a universe of well-behaved objects that courteously ask each other to carry out their various desires. ” Dan Ingalls, Byte ‘ 81. Basic notions:  Class and instance  Message and method Some Smalltalk programs The class library Objectives:  To mentally prepare for the next lecture...  Read Smalltalk.  To be able to write Smalltalk code.

3A-2 2 Historical Background Simula 67 Pascal C CLOS New Flavors Flavors Common Loops Object Pascal Quick PascalTurbo Pascal C++ C with classes C86Ada Little Smalltalk Algol 60 Lisp Smalltalk-72 Smalltalk-74 Smalltalk-76 Smalltalk-80 Smalltalk-78 Common Lisp LOOPS Clascal ANSI C++ Squeak

3A-3 3 Smalltalk History Developed at the Xerox Palo Alto Research Center (Xerox PARC):  Smalltalk-72  Smalltalk-76  Smalltalk-80 Originally intended for children. Ideas from:  Simula-67  Lisp  Logo Xerox pioneer ideas fumbled by the company:  Smalltalk  GUI  PostScript

3A-4 4 Smalltalk Versions Smalltalk-80: product of ParcPlace. UNIX, Mac, MS-DOS.  ObjectWorks  VisualWorks Smalltalk/V: product of Digitalk. MS-DOS, Windows, OS/2, Mac. Gnu Smalltalk: X based GUI. Compatible with Smalltalk- 80. Still under development. UNIX. Free. VisualAge : product of IBM. OS/2, Windows. Squeak  Started at Apple, continued at Walt Disney Imagineering  Derived directly from Smalltalk-80  Free, open source  Goals:  Portable  Written in Smalltalk

3A-5 5 Squeak in Our Course Squeak installed on:  SSDL Lab  Can be downloaded from:  Versions:  Windows  Linux Read all about it in the Assignment Yes, it is legal to download it and work at home! No, we will not give technical support for those who wish to work at home!

3A-6 Why Squeak? u Pure object-oriented language and environment l “Everything is an object” u Language and environment l Class browser, debugger, inspector, … l Mature class library and tools u Virtual machine l Objects exist in a persistent image [+ changes] l Portable: Compile once, run everywhere u Open-source, implemented in Smalltalk l Based on original Smalltalk-80 code 6

3A-7 Squeak by Example u l Free PDF download 7

3A-8 8 A Question What is the result of the Smalltalk expression:  * 3 Answer: 9 ( Why?!? ) In Smalltalk, 1 is an object. We sent it a message with selector + and argument 2. The response to this message is the object 3. Then, 3 receives the message * with argument 3 and responds 9. The objects 1, 2 and 3 know how to respond to messages like + and *, since they are all integer numbers. In Smalltalk, we say that 1, 2 and 3 are instances of the class SmallInteger. Each object is an instance of a class.

3A-9 9 In Smalltalk, everything is an object There is no way to create an entity that is not an object. Every object contains a small amount of memory == instance variables.  Only the object can access its memory.  An object ’ s memory can contain only other objects. Computation: send messages to objects. Objects have methods: what to do when messages are received. Each object is a member of exactly one class. Classes are organized in an inheritance tree.  Multiple inheritance only in very specialised versions.

3A-10 Class Library Smalltalk core is:  simple  minimal syntax The language lives and dies by its class library. Different in every implementation and in every version. Almost always includes:  Boolean  Numbers: integers, floating,...  Strings  Collections: sets, bags, arrays, lists, search tables...  (User interface) Can be subclassed by user.

3A-11 Bon Business Object Notation AKA: Better Object Notation Inventors:  Jean-Marc Nerson and Kim Walden (1995) Legend (partial) Abstract Class* Class Object Inheritance

3A-12 Squeak Class Library ArrayedCollection* Collection* Boolean* False false True true Character Object* Magnitude* Number* Integer Float Set Dictionary Sequenceable Collection* Array String This is only a partial view ProtoObject*