Download The SELF 4.1 Programmer`s Reference Manual
Transcript
Introduction Table of Contents Table of Contents 1 Introduction 1 1.1 Overview of the SELF System .................................................................................................1 1.1.1 1.1.2 The system...........................................................................................................................1 The translation process ........................................................................................................2 Language Reference 3 2.1 Objects .............................................................................................................................................3 2.1.1 2.1.2 2.1.3 2.1.4 2.1.9 2.2 Slot descriptors..............................................................................................................................7 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 Read-only slots ....................................................................................................................8 Read/write slots ...................................................................................................................8 Slots containing methods.....................................................................................................9 Parent slots.........................................................................................................................11 Annotations........................................................................................................................11 Expressions ..................................................................................................................................11 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.3.10 2.4 Syntax ..................................................................................................................................3 Data objects .........................................................................................................................4 The assignment primitive ....................................................................................................4 Objects with code ................................................................................................................5 Construction of object literals .............................................................................................7 Unary messages .................................................................................................................12 Binary messages ................................................................................................................13 Keyword messages ............................................................................................................13 Implicit-receiver messages ................................................................................................14 Resending messages ..........................................................................................................15 Message lookup semantics ................................................................................................15 Message send.....................................................................................................................16 The lookup algorithm ........................................................................................................17 Undirected Resend.............................................................................................................17 Directed Resend.................................................................................................................18 Lexical elements .........................................................................................................................18 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 Character set ......................................................................................................................18 Identifiers ...........................................................................................................................19 Keywords...........................................................................................................................19 Arguments .........................................................................................................................19 Operators ...........................................................................................................................20 Numbers ............................................................................................................................20 Strings................................................................................................................................21 Comments..........................................................................................................................22