BYTE.com
RSS feed

Newsletter
Free E-mail Newsletter from BYTE.com
Email Address
First Name
Last Name




 
    
             
BYTE.com > Mr. Computer Language Person > 2004

Self, Slate, and Prothon

By Martin Heller

May 31, 2004

(Self, Slate, and Prothon :  Page 1 of 1 )



The year was 1987. The current version of MS-DOS was 3.3, and the hot new operating system for 80286-based computers was OS/2. At Stanford University, researcher Randall B. Smith and his group were working on a new language called Self, which Smith and David Ungar designed at Xerox PARC in 1986, and described at OOPSLA '87. The Self project moved to Sun Microsystems Labs in 1991, and continued through 1995.

Self is an object-oriented programming language and associated programming environment. It is close in spirit and semantics to Smalltalk, but it is simpler and more concrete. Self has no classes: It implements object inheritance more directly.

In Self, an object is made up of slots. A slot has a name and contains a reference to an object. All of an object's state and behavior is contained in its slots. Messages are matched with slots by name. Slots can be methods or data.

In Self, when we want a new object, we find an existing one and copy it. We can then change the copy, safe in the knowledge that we have not affected anything else. The master object from which all objects of the same type are copied (directly, or indirectly via another copy) is known as a prototype.

A traits object contains only shareable state and behavior, intended to be used by inheritance. Unlike a class, it does not mandate a particular storage structure in its descendants. It is usually incomplete (i.e., it does not implement all the messages it send to self; these are to be implemented in descendants). Any object which implements the appropriate messages can inherit from the traits object.

Blocks are Self closures, similar to anonymous functions (lambdas) in Lisp and functional languages. Self implements multiple inheritance by allowing multiple parent slots. Self also allows assignment to parent slots, which gives it dynamic inheritance. Self has its own thread system, including a scheduler and semaphores.

I have to admit that I never programmed in Self: It ran (and runs) on machines from Sun Microsystems, on the Macintosh, and on the PowerPC, and I never had any of those long enough to do anything significant with them.

 Page 1 of 1 


BYTE.com > Mr. Computer Language Person > 2004
Dr. Dobb's Media Center
BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE: Volume 2 - Heuristic Algorithms
The Best of BYTE: Volume 2 - Heuristic Algorithms
In this volume of Best of BYTE, we explore the emergence of some heuristic algorithms. Although we have only scratched the surface of this intriguing subject, we hope we've suggested the potential of the synthesis of heuristics and algorithms.

© 2008 Think Services, Privacy Policy, Terms of Service, United Business Media Limited
Site comments: webmaster@byte.com
Web Sites: BYTE.com, dotnetjunkies.com, Dr. Dobb's Journal, SD Expo, Sys Admin, sqljunkies.com, Unixreview



MarketPlace
IT Service Management that Delivers. Real Value. Real Flexibility. Real Results. Free Demo.
Fast online exception analysis. Capture customer crash data online.
One Stop to Buy All Your Business IT Solutions. Browse Through Dell's Best Deals Online Now!
Find Scalable and Secure Dell� Network Server Solutions at Dell� - Official Site.
Advance Your Business Technology Now with the Thin and Portable Business Solutions at Dell.com Now!
Wanna see your ad here?
 

web2