Fancy (programming language)

Fancy
Paradigm object-oriented
Designed by Christopher Bertels
Developer Christopher Bertels
First appeared 2010
strong, dynamic
OS Unix-like (including Mac OS X and Linux)
License BSD license
.fy, .fyc, .fancypack
Website www.fancy-lang.org

Fancy is a pure object-oriented programming language that is heavily influenced by Smalltalk and Ruby. The language is currently under development as an open source project by Christopher Bertels.[1]

Development

The language has been in development since the beginning of 2010 and has changed from a C++-based interpreter to be running on Rubinius, a dynamic bytecode virtual machine and implementation for the Ruby programming language.[2] Thus Fancy supports seamless integration with Ruby and any Ruby libraries.

Language characteristics

Fancy is a dynamic programming language,[1] meaning that it will execute tasks at runtime that many languages would perform during compilation. Fancy is a garbage-collected language, like Java or Ruby.[3] The goals of Fancy as a programming language are to be easily understandable by programming beginners, and to perform well enough to be used as a scripting language in Unix environments.[4]

Fancy and Ruby

Fancy is implemented on top of Rubinius, the Ruby VM, and therefore integrates well with Ruby.[4] Since Fancy is built on Ruby objects, the authors decided to allow access to the original Ruby classes by using a different syntax.[5] For this reason, Fancy can be extended easily to use Ruby libraries, or any of the C-extensions that are native to Ruby. Recently, a Ruby Gem was released for automated installation of the language.[6]

Author

Christopher Bertels is a Computer Science and Philosophy student at the University of Osnabrück in Germany.[7] He has been working on the Fancy language for around a year, and has spoken about Fancy at the 2010 Ruby and Rails European conference[4] and the Emerging Languages Camp at OSCON.[8][9]

Features

Implementation

The implementation of the current release is a runtime using the Rubinius virtual machine, meaning that the language is running on the same platform 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.[10]

Examples

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

References

  1. 1.0 1.1 1.2 1.3 1.4 1.5 ”About Fancy.” https://github.com/bakkdoor/fancy/wiki
  2. Christopher Bertels (2011-02-23). "Introduction to Fancy". Rubinius. Retrieved 2013-07-08.
  3. "Category:Fancy". Rosetta Code. Retrieved 2013-07-08.
  4. 4.0 4.1 4.2 "RubyAndRails". Rubyandrails.eu. 2010-10-22. Retrieved 2013-07-08.
  5. /. "fancy/README.md at master · bakkdoor/fancy · GitHub". Github.com. Retrieved 2013-07-08.
  6. "fancy | RubyGems.org | your community gem host". RubyGems.org. Retrieved 2013-07-08.
  7. "About me – Adztec Independent - Blog". Adztec-independent.de. Retrieved 2013-07-08.
  8. “Emerging Languages Talk Slides” http://www.fancy-lang.org/blog/2010/07/emerging-languages-talk-slides/
  9. "Fancy: OSCON 2010, The O'Reilly Open Source Convention - O'Reilly Conferences, July 19 - 23, 2010, Portland, OR". Oscon.com. Retrieved 2013-07-08.
  10. /. "fancy/README.md at master · bakkdoor/fancy · GitHub". Github.com. Retrieved 2013-07-08.

External links