1 #LyX 1.3 created this file. For more info see http://www.lyx.org/
14 \use_numerical_citations 0
15 \paperorientation portrait
18 \paragraph_separation indent
20 \quotes_language english
24 \paperpagestyle default
37 This paper outlines the plans for and documents Slate language and environment
38 design decisions, the motivations behind them, and open questions.
42 \begin_inset LatexCommand \tableofcontents{}
53 \begin_inset Quotes eld
57 \begin_inset Quotes erd
60 variant of the Smalltalk language and system idea.
61 The project was started in 2000 as a series of experiments to see what
62 could be made of the Self project results to benefit everyone.
63 Numerous models were tried and thrown out.
64 Finally, we decided to take a few principles and re-work the Smalltalk
65 language without bothering the syntax or mind-set involved unnecessarily.
66 The result was surprisingly usable and still afforded us a large enough
67 expansion on the original expressive power to justify building a new system
69 This paper presents the ideas involved in what resulted, and details some
79 Slate is largely based on objects as sets of properties with methods defined
80 on them, which are dynamically activated by message-sends from other objects.
81 Pieces of code can be encapsulated and remotely activated as block objects.
82 Block objects in Slate have closure semantics: the scope which defines
83 the block of code is remembered by the block wherever it is passed.
89 Slate uses a method-lookup algorithm that cooperatively involves all arguments.
90 In order to be intuitive for those coming from a single-dispatch background,
91 method precedence is associative with the left-most arguments.
92 However, Slate does not yield privileged access to any single method argument
96 Multiple dispatch is a complex process, so it involves a performance penalty.
97 Traditional implementations compile a table of methods with the same name,
98 and select a method from the table based on the message-send signature.
99 Slate's lookup system is lazier than this, by having each object remember
101 \begin_inset Quotes eld
105 \begin_inset Quotes erd
108 in methods, and traversing up the inheritance chains until a first-appropriate-
110 This basic principle allows a simple dynamic system which only imposes
111 a significant penalty for multiple dispatchings when they are used.
114 The benefits to be reaped basically amounts to clarity and a removal of
115 a level of indirection in the case where multiple dispatch is often emulated
118 \begin_inset Quotes eld
122 \begin_inset Quotes erd
125 pattern has turned out to constitute the majority of multiple dispatch
126 cases, and some libraries are a lot more lucid once translated if they
127 heavily involve binary operators involving both types in the logic.
133 Methods may be installed on any instance in the system, including immediate
134 objects (Integers, Characters, etc.).
135 So, handling Singleton objects in any argument position is more directly
137 This is more significant when laying out an environment and customizing
138 the various objects within for tasks, without having to delineate distinct
139 classes for each functionality.
142 Methods as Named Closures
145 Slate's methods are developed as an extension of the definition of code
147 A method's signature is followed by a block definition.
148 The argument names in the signature become block arguments, and the dispatched
149 arguments' roles are annotated to include this closure.
150 This allows method definition to be
151 \begin_inset Quotes eld
155 \begin_inset Quotes erd
158 in comparison to the characteristic of Smalltalk-80 systems to use a very
159 specialized method definition syntax which suits the browser tool, and
160 has a place within the chunk format, but generally doesn't have any fundamental
161 ties to the language or system.
167 An idea only briefly visited some years ago by David Ungar and Randall Smith
168 is the idea of subject-orientation: treating the context as an extra invisible
169 argument to a message.
170 We are looking at seeing what is possible in this area, with structured
171 notions of context, perhaps to represent the current user, some system
172 state, or access level.
175 The current plan is to implement this as an extra-argument part of the multiple
176 dispatch as an experiment in this functionality.
188 Slate inherits Self's lack of direct slot assignment syntax, requiring normal
189 access and update to occur through methods.
190 There is a reflective interface which overrides this, and the accessor/mutator
191 methods work with this level.
194 Also like Self, any references to identifiers are really message-sends to
198 It is worth noting that Self's
202 syntax is not used in Slate; block definitions mostly suffice, and methods
203 cannot be inserted into object slots, so the need does not arise.
206 A small change was adopted for the same reasons that Self used it.
207 Block headers must be delimited on both sides by vertical bars, to help
208 distinguish the local declarations from implicit context sends.
214 Slate has generally taken the route of a declarative build from independent
215 source files until we achieve some bootstrapped system status.
216 This has allowed the presentation of Slate without a purpose-built development
217 environment in order to rapidly evaluate the ideas without the subtle influence
219 Thus far, the need for a
220 \begin_inset Quotes eld
224 \begin_inset Quotes erd
227 format has not arisen, so the bang signifier in chunk-style inputs has
228 not been allocated from the character table.
234 Method definitions consist of a method signature denoted with the
238 character between the argument name and a dispatch expression.
239 The parser expects some object to follow which yields a block which constitutes
243 Separator Sensitivity
246 Slate currently follows a liberal policy about identifiers, which makes
247 whitespace as a separator very important.
250 Character-Appropriation Summary
256 Strongtalk-Influenced Collections
262 The exception-handling system is based on Dylan's condition system, itself
263 an object-oriented version of Common Lisp's condition system.
284 Intermediate Language Encoding