Chapter 1. A Slate Tutorial

Table of Contents
Introduction
Installation and Setup
Slate's Object Model
Slate's Execution Model
Organizing Objects
Organizing Behavior

Introduction

This is a tutorial for the version 0.3 of Slate.

Slate is both a general purpose, fully object oriented programming language and an environment. The language is the result of thorough research that draws inspiration and ideas from many other existing languages such as Smalltalk, Self, Common Lisp (CLOS) or Dylan among others, and tries to integrate and extend them. It strikes a balance between a simple syntax, a prototype based object model and the use of powerful abstractions to allow for great flexibility in the design and maintenance of programs.

Some leading Slate features include: a consistent prototype-based object model, multiple dispatch and mix-ins, subjective programming, reflection, and a powerful, well-factored collection library. As Slate is still a work in progress, you may expect still more from a near future.

The Slate environment in Slate 0.3 is an interactive shell with a text-only interface. This interactive shell lets you inspect existing objects, debug Slate code, evaluate any Slate expression, create new objects, or extend existing ones.

Support for native shell commands (the equivalent of the Unix system () call), as well as a foreign function interface to connect to existing libraries written in another language are planned, but not yet available.

The Slate language features can be considered stable, and the use of the interactive shell along with an editor (there's an emacs mode and a vi mode for Slate) provides a usable environment to develop in Slate. However, due to its youth, the Slate environment still lacks many of the tools that come with any Smalltalk or Lisp environment (source code management, browsers, ...) Any contributions are warmly welcomed, of course :-) .

Slate 0.3 has its own virtual machine and image. The virtual machine is written in a subset of Slate called Pidgin, then translated from Pidgin to C. The translation step is fully done in Slate, too. The C code of the virtual machine is then given to a C compiler to produce the executable. It is planned to get rid of the C part some time in the future and have Slate dynamically compile itself to machine code. Slate 0.3 is the first bootstrapped Slate version. Previous ones relied on an underlying Lisp compiler and interpreter for evaluation, image dumping and garbage collection.

Detailed information on Slate is available online in the Slate Programmer's Manual at http://slate.tunes.org/progman.

We hope you'll have as much fun with Slate as its current developers and users.