Introduction :snail:

Snail1 (or more formally, the Strings Numbers Arrays and Inheritance Language), is a dynamically typed, expression-based, object-oriented programming language that is simple enough to be implemented in a one-semester course.

Snail programs consist of a set of classes, each of which encapsulates a collection of member variables and methods that define a data type. Objects are instances of these classes. In snail, every piece of data is an object (that is defined by a class). As suggested by the name of the language, it is possible for one class to inherit the variables and methods of another class, thereby extending the behavior of a given type.

To simplify the language syntax, snail is an expression-based language. Thus, nearly every snail construct is an expression that produces some value (object) when evaluated.

Hello World

class Main : IO {
    main() {
        print_string("Hello, world.\n");
    };
};

More examples of snail programs are available here.

Work in Progress

This documentation (along with the snail language itself) is a current work in progress. Please submit a bug report if you have a question or find a problem.

  1. Officially, the snail acronym is written using all lower-case letters; however, the first letter may be capitalized at the beginning of sentences. Despite the last letter standing for “language”, it is entirely acceptable to say “snail language”. 

Recent Posts

Version 1.3.0 Released

Version 1.3.0 of snail has been released. This version adds a language server feature, which allows IDEs to query snail for parsing and lexing errors. This...

Version 1.2.0 Released

Version 1.2.0 of snail has been released. This version contains minor bug fixes as described below as well as some internal changes. You can download a copy...

Version 1.1.0 Released

Version 1.1.0 of snail has been released. This version contains minor bug fixes as described below as well as some internal changes. You can download a copy...

Version 1.0.1 Released

Version 1.0.1 of snail has been released. This version contains minor bug fixes as described below. You can download a copy from the Downloads page.

Version 1.0.0 Released

Version 1.0.0 of snail has been released. You can download a copy from the Downloads page. Changes Initial release