Jump to content

User:Ray49/Fancy (programming language)

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Jerryobject (talk | contribs) at 03:21, 1 October 2015 (WP:LINK update, cut needless WP:PIPE.). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Fancy
Paradigmobject-oriented
DeveloperChristopher Bertels
First appeared2010
Typing disciplinestrong, dynamic
OSOS X, Linux, others
LicenseBSD
Websitewww.fancy-lang.org
Influenced by
Smalltalk, Ruby, Erlang, Io

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

History

[edit]

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

[edit]

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 supplied to both the developer and the userbase
  • Providing a standard library which has the power to solve most common programming problems
  • Providing simple and consistant symantics and syntax
  • Allow a single task to be completed several distinct ways
  • By running on a cross-platform virtual machine, 'embrace unix system users'
  • Be open to criticism, discussion and improvement[4]

Features

[edit]

Fancy's current revision includes:

  • Class definitions that, when nested, work like submodules
  • Instance and class instance calling, and method calling
  • Loop-, iterator- & common collection methods
  • Anonymous functions, closures (blocks)
  • A simple package management system, similar to RubyGems
  • Simple pattern matching
  • Easy reflection (as in Ruby)
  • Literal support for regular expressions, arrays, tuples, hashes (dictionaries), blocks, integers, floats, symbols, (multiline) strings and more
  • Exception handling
  • A bootstrapped (self-hosted, completely in fancy written compiler for generating Rubinius bytecode)
  • Easy integration with Ruby: calling out to any Ruby libraries that run on Rubinius, including most C-extensions

Implementation

[edit]

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 a self-hosted (bootstrapped compiler) that generated Rubinius bytecode. To allow more simple cross-platform development, nearly all of the standard library is written in Fancy itself (with a few small peaces that currently are implemented in Ruby).[5]

Examples

[edit]
Description Syntax
Simple print
 "hello world!" println
Looped print 5 times
 5 times: { "hello world!" println }
Calling methods
 var method1: param1 . method2
Calling Ruby methods
 var ruby_method1(param1) ruby_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

[edit]

Bertels plans on doing a number of things to enhance Fancy. This is including improving the standard library and adding first-class support for concurrency semanctics and privimites besides just locks and condition variables, like actors and futures.[6]

[edit]

References

[edit]