Self: The Power of Simplicity David Ungar and Randall B. Smith Presenter: Jonathan Aldrich 15-819.

Slides:



Advertisements
Similar presentations
Objects and Classes David Walker CS 320. Advanced Languages advanced programming features –ML data types, exceptions, modules, objects, concurrency,...
Advertisements

Lecture 10: Part 1: OO Issues CS 540 George Mason University.
Object Orientation Chapter SixteenModern Programming Languages, 2nd ed.1.
Chapter 1 OO using C++. Abstract Data Types Before we begin we should know how to accomplish the goal of the program We should know all the input and.
CSE 341, Winter Type Systems Terms to learn about types: –Type –Type system –Statically typed language –Dynamically typed language –Type error –Strongly.
Objects and Classes David Walker CS 320. Advanced Languages advanced programming features –ML data types, exceptions, modules, objects, concurrency,...
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
History of the language self Sandeep K Gude. History Designed by - David Ungar, Randall Smith Presented as "SELF: The Power of Simplicity", OOPLSA '87,
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
Harvey SiyPrinciples of Object-Oriented Software Development by Eliens Slide 1 Object-Oriented Programming Languages Principles of Object-Oriented Software.
The Object Oriented Programming Languages (OOPL). Done by: Tayeb El Alaoui Supervised by: Dr Driss Kettani.
Principles of Object-oriented Programming Programming Language Paradigms August 26, 2002.
Trey Mack James Moore Osa Osar-Emokpae
Static and Dynamic Behavior Fall 2005 OOPD John Anthony.
Objects and Classes David Walker CS 320. Advanced Languages advanced programming features –ML data types, exceptions, modules, objects, concurrency,...
1 A Short Introduction to (Object-Oriented) Type Systems Kris De Volder.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
C++ for Java Programmers Chapter 1 Basic Philosophical Differences.
Language Evaluation Criteria
A First Program Using C#
Programming Languages and Paradigms Object-Oriented Programming.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
OOPs Object oriented programming. Based on ADT principles  Representation of type and operations in a single unit  Available for other units to create.
16 - Generics. 2 NOEA2009Java-kursus – Generics ”Generic” Programming in C#/Java (as it was until Summer 2005) All classes inherit from Object So we can.
CSE 332: C++ templates This Week C++ Templates –Another form of polymorphism (interface based) –Let you plug different types into reusable code Assigned.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
CSCI-383 Object-Oriented Programming & Design Lecture 1.
Generics in.NET and C# Generics. ”Generic” Programming in C#/Java (as it was until Summer 2005) All classes inherit from Object So we can apply polymorphism.
The Procedure Abstraction, Part VI: Inheritance in OOLs Comp 412 Copyright 2010, Keith D. Cooper & Linda Torczon, all rights reserved. Students enrolled.
Method Overriding Remember inheritance: when a child class inherits methods, variables, etc from a parent class. Example: public class Dictionary extends.
CSE 425: Object-Oriented Programming I Object-Oriented Programming A design method as well as a programming paradigm –For example, CRC cards, noun-verb.
Rossella Lau Lecture 1, DCO10105, Semester B, DCO10105 Object-Oriented Programming and Design  Lecture 1: Introduction What this course is about:
Introduction to Object Oriented Programming CMSC 331.
CSSE501 Object-Oriented Development. Chapter 11: Static and Dynamic Behavior  In this chapter we will examine the differences between static and dynamic.
Java Objects and Classes. Overview n Creating objects that belong to the classes in the standard Java library n Creating your own classes.
Chapter 12 Support for Object oriented Programming.
A Shared View of Sharing: The Treaty of Orlando By Lynn Andrea Stein, Henry Lieberman, David Ungar.
Chapter 3 - Language Design Principles
Software Engineering Emphasis for Engineering Computing Courses William Hankley Computing & Information Sciences Kansas State University.
Salman Marvasti Sharif University of Technology Winter 2015.
Object-Oriented Programming Chapter Chapter
CS 598 Scripting Languages Design and Implementation 8. Self.
OOPs Object oriented programming. Abstract data types  Representationof type and operations in a single unit  Available for other units to create variables.
CPS Inheritance and the Yahtzee program l In version of Yahtzee given previously, scorecard.h held information about every score-card entry, e.g.,
ISBN Object-Oriented Programming Chapter Chapter
Method Overriding Remember inheritance: when a child class inherits methods, variables, etc from a parent class. Example: public class Dictionary extends.
1.Net programmingGenericsNOEA / 2009 Generics 11. Generics in.NET and C#
Object-Oriented Programming “The Rest of the Story”, CS 4450 – Chapter 16.
Terms and Rules II Professor Evan Korth New York University (All rights reserved)
 2000 Prentice Hall, Inc. All rights reserved. Chapter 20 - Virtual Functions Outline 20.1Introduction 20.2Type Fields and switch Statements 20.3Virtual.
A Survey of Object-Oriented Concept Oscar Nierstrasz.
CSCI-383 Object-Oriented Programming & Design Lecture 17.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
ISBN Chapter 12 Support for Object-Oriented Programming.
Notices Assn 2 is due tomorrow, 7pm. Moodle quiz next week – written in the lab as before. Everything up to and including today’s lecture: Big Topics are.
Object Oriented Programming in Java Habib Rostami Lecture 2.
Ruby Tien Ho and Brandon Hostetter. Overview ▸ Object-oriented, functional, imperative, and reflective ▸ Interpreted language ▸ Influenced by Perl, Smalltalk,
1 Case Study: Meta Classes  Class representation in memory  Class variables and class methods  Meta Classes  3 Level System  4 Level System  5 Level.
Inheritance Modern object-oriented (OO) programming languages provide 3 capabilities: encapsulation inheritance polymorphism which can improve the design,
Object-Oriented Programming
Ch 10- Advanced Object-Oriented Programming Features
Inheritance and Polymorphism
University of Central Florida COP 3330 Object Oriented Programming
Object Oriented Programming in Java
Types of Programming Languages
Type Systems Terms to learn about types: Related concepts: Type
Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach
Objects and Aspects: What we’ve seen so far
Dynamic Languages Hal Perkins Autumn 2009
Presentation transcript:

Self: The Power of Simplicity David Ungar and Randall B. Smith Presenter: Jonathan Aldrich

History: Smalltalk First “modern” OO language – Alan Kay, 1970s –Everything is an object (e.g., the number 15, the class List) –Garbage collection –Closures Exploratory programming –Designed for kids –Dynamically typed –Add new code/evaluate exprs with no compilation required Extraordinary development environment –10-20 years ago, better than the best IDE today Try it (Squeak)

Self’s Simplicity No classes (clone objects instead) No variables (use messages) No control structures (use polymorphism) Everything is an object

Classes vs. Prototypes Classes –Hold behavior –Inherit from another class –Can be instantiated Objects –Hold state –Are an instance of a class Prototypes –Hold behavior –Delegate (inherit) to another object –Can be cloned –Hold state

Classes vs. Prototypes

Instantiation vs. Cloning

Self Flexibility

Control Structures

Modeling closures Just prototype objects –Cloned when closure is invoked –Slots for local variables –parent pointer refers to enclosing environment For closures, just the enclosing method For methods, set to receiver object

Closures

Multiple Inheritance

Code Example

Expressiveness Examples in paper –Sharing state between objects –Singleton objects –Easily replace variable with method Run-time behavior changes –Add/remove methods –Dynamic Inheritance: Add/remove/change parent links

Dynamic Inheritance Example ReactorController parent* … NormalController operate = { … if (badness) parent*: SafetyController … } SafetyController restart = { … if (safe condition) parent*: NormalController … }

Checking Dynamically typed –Errors are caught at run time This slide is largely a placeholder –Will be important part of discussion in other papers

Claimed Engineering Benefits (in addition to expressiveness) Concreteness of prototypes Simplicity of cloning [Eliminates infinite meta-regress of Smalltalk]

Engineering Challenges Are classes too useful to programmers to give up? Difficulty of reasoning about dynamism Typechecking [Andi’s research]

Secret Agenda Development of new language: Plaid –Prototype-based Unifies objects, classes, modules –Type-safe dynamic inheritance –Other features Multi-methods, aspects, typestate, ownership Emphasis: safe component-based SE