Jump to content

User:Ray49/Fancy (programming language)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ray49 (talk | contribs) at 10:19, 30 November 2010. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Fancy is a pure object oriented language, inspired by Ruby, Smalltalk, and Erlang that is under development.[1]

History

Image of the developer
Chrisopher Bertels speaking at RAR10.

The creator Christopher Bertels is a student at the University of Osnabrück, Germany, studying Computer Science and Philosophy. His main interests lie in the advancement of Free Software, programming language implementations and virtual machine technology.[2] Fancy was created to be a pure object oriented programming language, which would be reasonably fast, dynamically typed and completely object oriented whilst still being easy to understand and portable. The first official release was v0.1.0, released on May 28th 2010; the most recent stable release being v2.0.0, from July 14th 2010 and more features are to be added in the future.[3]

Goals

The language was designed to fulfill the following goals:

  • Provide a simple, easy to understand and extensible implementation for a dynamic, pure object-oriented (Smalltalk inspired), concurrency-focused programming language
  • Good documentation of the implementation on both the developer and user side
  • Provide a “batteries included” standard library
  • Simple and uniform syntax and semantics
  • There’s more than one way to do it
  • Embrace Unix systems
  • Be open to discussion and improvements[4]

Features

Fancy's current revision includes:

  • Class definitions that, when nested, work like submodules
  • Instance and class instance calling, and method calling
  • Looping functions
  • Anonymous functions and Blocks
  • Simple file reading and writing
  • Support for Regular Expressions
  • Exception Handling[5]

Implementation

The implementation of the current release is a runtime using the Rubinius virtual machine, meaning that the language is running the same runtime as Ruby, and is accompanied by an interpreter which is written in C++. The runtime supports dynamic message calls, access to the current scope as a first-class value, and exception handling similar to Ruby. To allow more simple cross-platform development, most of the included library is written in Fancy itself.

Examples

Description Syntax
Simple print "hello world!" println
Looped print 5 times {5 "hello world!" println}
Method calling var.method1(param1).method2
Class Definitions
 class Person {
   read_write_slots: ['name, 'age, 'country]
   "Creates a new Person instance with the given name, age and country."
   p = Person new
   p name: name
   p age: age
   p country: country
   p  
 }
Nested classes
 class Outer {
   class Inner {
     class InnerMost {
       def football {
         "football"
       }
     }
   }
 }

instance = Outer Inner InnerMost new instance football println

Future Plans

Bernels plans on doing a number of things to enhance Fancy. This is including improving the standard library, a betacode compiler for rubinius, and others things are to be added as well.[6]

References