From Bauman National Library
This page was last modified on 2 June 2016, at 08:38.
Revision as of 08:38, 2 June 2016 by eugene manaka (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Paradigm object-oriented prototype-based
Designed by Benoît Sonntag
Developer Benoît Sonntag & Jérôme Boutet
First appeared 2003
Stable release 0.13.1 (specification) / 17 February 2008
Typing discipline static typing
Major implementations
Influenced by
Smalltalk, Self, Eiffel

Lisaac is the first compiled object-oriented language based on Prototype-based programming|prototype concepts. The ideas in Lisaac are mostly inspired by Smalltalk (all values are objects), Self (prototype-based side) and Eiffel (design by contract). Although it stands as a Self's successor, it distinguishes itself in many ways, essentially because of system-programming constraints. Lisaac allows low-level programming but remains a high-level language. Its powerful compiler uses original compilation techniques for late binding suppression and optimisations of type predictions and code specialisation. This compiler gives the target code an efficiency that no other languages of the same type has matched so far.


  • Was originally developed to implement the Isaac operating system
  • Supports interruptions and device memory mapping
  • Lisaac compiler generates optimized portable ANSI C code
  • Performs nearly as fast as native C code[1][2]
  • Although Lisaac is strongly typed, there is no distinction between data and code
  • Despite being compiled, all objects retain their dynamic abilities

Basic syntax

Lisaac is case sensitive. Keywords are capitalized (Section, Header, Public, …), type identifiers are written in upper case letters (INTEGER, BOOLEAN, OBJECT, …), and identifiers denoting variables and slots are written in lower case letters. Objects are composed of slots, which can be data or code. The ':' symbol is used to declare types. Slot names are prefixed with a '+' or '-' symbol to indicate whether the slot is local to an object or shared between objects.

Parentheses are used to delimit lists of semicolon separated statements. Statement lists may have zero, one or more return values. The ':=' symbol is used to bind a slot to a statement or statement list that is executed at the loading/initialization of an object. The '<-' symbol is used to bind a slot to a statement list that is executed on the call of the slot.

Code samples

«Hello, World» program

 Section Header 
    + name := HELLO_WORLD; Section Public 
    - main <- 
        "Hello world\n".print;

Dynamic inheritance

The parent of each object is just a slot that can be assigned as required in the code, for instance:

 Section Header
    - NAME := DECOD_MPEG2_TO_SCREEN; Section Inherit
    - videoparent : OBJECT <- 
        + result : OBJECT;
        .when 1 then { result := WINDOW;}
        .when 2 then { result := VIDEO_VGA;}
        .when 3 then { result := VIDEO_TVOUT;};
    ) Section Public
    - typ : INTEGER; 
    - decode_stream <- 
        putimage decode_to_bitmap;

Operator redefining

In Lisaac, an operator is a slot and can be redefined. For example overloading the + operator for a NUMERIC object:

    - '+' Left 80 other:SELF :SELF <- Self - -other;

Or for a matrix:

    - '+' Left 80 other:SELF :SELF <-
        + result : SELF; 
        result := SELF.create count; tab.count do {
            i : INTEGER;
            result.put (item i+other.item i) to i; 


Generic objects are supported, for instance:


Contract programming

Contract programming using Z notation is provided.


Cite error: Invalid <references> tag; parameter "group" is allowed only.

Use <references />, or <references group="..." />

External links

  1. Lisaac
    1. "Isaac project benchmarks". Archived from the original on 2007-11-12. Retrieved 2007-07-24. 
    2. "Computer Language Benchmarks Game". Archived from the original on 2012-03-19. Retrieved 2008-07-08.