Fuxi Programming Language
{{ infobox programming language | name = Fuxi | paradigm = Object-oriented, declarative | year = | designer = | latest_release_version = | latest_release_date = | latest_test_version = | latest_test_date = | turing-complete = | typing = | implementations = | influenced_by = | operating_system = | license = | website = http://www.fuxi.org }}
Fuxi (pronounced foo-shee) is a general-purpose, concurrent, object-oriented, declarative programming language. It was designed for use in application and systems programming, and implemented to meet the demands of network computing and mobility, and to provide a vehicle for rapid prototyping of software. It intends to make programming enjoyable, through the well-designed combination of the best IDeaS found in object-oriented, concurrent, functional, and logical programming paradigms, and The Embodiment of a design philosophy: simplicity, efficiency, uniformity and consistency with conventions. So, Fuxi adopts a syntactical system and an object model strongly influenced by major current languages, such as C/C++, C#, JAVA, though the language itself is more declarative.
Philosophy
Fuxi reflects the major aspects of Object-oriented programming, but differs from C++ and Java in that it differentiates methods into functions, clauses, and triggers, and gives them a uniform syntax through pattern matching. The notable language features include:
- Orthogonal stylization of objects;
- Guarded fields;
- Pattern extending and overriding in inheritance;
- Scripted object definition.
Examples
The following is a simple example of Fuxi, which calculates the Fibonacci numbers:
import fuxi.*
public active Fibonacci : Applet
{
Fib(0) = 1
Fib(1) = 1
Fib( int n ) = Fib(n - 2) + Fib(n - 1)
public Activate() =
let
{
int n = System.Console.Readln().ToInteger()
}
in
{
System.Console.Print( "Please Input a Number:" )
System.Console.Println( "Fib(" + n + ")=" + Fib(n) )
}
}