Slate Programming Language Help For Students

Introduction to Slate

Slate is a prototype-based object-oriented programming language based on Self, CLOS,and Smalltalk-80. Slate syntax is intended to be as familiar as possible to a Smalltalker, for the clarity of messages as phrases. Unlike the Smalltalk family, methods within Slate can be assigned to a signature of objects, instead of being installed on one favored receiver. Slate has also many further expansions of the semantics which enable more concise and natural ways to express solutions to problems. Slate also has a section for code samples (complete with syntax highlighting) on the right side of the page.

Example: Handling an exception

{`

 # raise (throw) an exception

def spam

  raise SillyError, 'egg'

end



 # rescue (catch) an exception

begin

  spam

rescue SillyError => se

  puts se  # writes 'egg' to stdout

end

`}
{`

begin

  foo

rescue ArgumentError => e

  # rescues a MyInvalidArgument or any other ArgumentError

  bar

rescue => e

  # rescues a StandardError

  quack

else

  # runs if no exception occurred

  quux

ensure

  # always runs

  baz

end

`}

...

Compiler Download

To get started, see Download and install TADS and follow the instructions....