Skip to content


Subversion checkout URL

You can clone with
Download ZIP
The Fancy Programming Language - Fancy is a dynamic, object-oriented programming language heavily inspired by Smalltalk, Ruby and Erlang.
Fancy Ruby JavaScript Other

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


The Fancy Programming Language
(C) 2010 Christopher Bertels <>


Fancy is a dynamic, object-oriented programming language heavily
inspired by Smalltalk, Ruby and Erlang. It will support dynamic code
evaluation (as in Ruby & Smalltalk), concurrency via the actor-model
and many more features yet to be implemented.


It’s still in development, the implementation consisting of an
interpreter written in C++.

For some example code (that can be successfully executed), have a look
at the examples/ directory.

There's also lots of test coverage code. Have a look at the tests/
directory for these. The tests are written in FancySpec, a simple
testing library (somewhat similar to Ruby's RSpec). FancySpec's
implementation can be viewed in lib/fancy_spec.fnc.


Compiling / Installing from source:

Fancy is currently built using flex & bison for parsing and uses the
BoehmGC for garbage collection. You'll need the following
libraries/programms in order to build the sources:
  - GNU Make
  - Bison ( preferrably version 2.4 and higher )
  - Flex
  - libgc ( BoehmGC - It's included in the vendor/ directory
            but you can also get it here:

For example, to build on Ubuntu Linux, run:
  $ cd <fancy_source_path>
  $ sudo apt-get install g++ make bison flex
  $ make && make test

Some technical information:

What's already working?

  - Class definitions
  - Instance & class method definitions
  - String, Integer, Float, Array, Hash (HashMap) & Block literals
  - Method & Operator calls
  - Instance & class variable access
  - Dynamic getter and setter method definitions (similar to Ruby's attr_acessor)
  - Loops
  - Support for closures (it works but there's definately room for
    performance improvements)
  - File reading and writing
  - Class-Mixins (including methods of one class into another)
  - Exception handling

What's still missing?

  - Pattern matching
  - Concurrency stuff (Actor-model based concurrency features as in
  - Some more advanced stuff, e.g. runtime inspection of method calls
    via MethodContext etc. (advanced stuff - saved for later)

How is it implemented?

  - Currently, theres a quite simple interpreter written in
    non-idiomatic C++. 
    Sorry, I'm not a big C++ programmer. It should be fairly easy to
    read though.

  - It uses the BoehmGC for garbage collection.

  - Currently the lexer & parser are built with flex & bison.

  - I'm planning to add a compiler later on, written in the language
    itself. Possible targets include beam (Erlang VM), LLVM, JVM, ...?

    I'd prefer not writing my own vm from scratch. Rubinius' or
    Erlang's VM would seem a nice fit.



vendor/gc: GC Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
           For more information see the vendor/gc directory.

Fancy is licensed under the terms of the GNU LGPL v3. For more
information on licensing issues have a look at the LICENSE file.
Something went wrong with that request. Please try again.