Genie (programming language)
Encyclopedia
Genie is a modern, general-purpose high-level programming language
in active development since 2008. It was designed as an alternative, simpler and cleaner dialect for the Vala
compiler
, while preserving the same functionality of the Vala language. Genie uses the same compiler and libraries as Vala, the two can indeed be used alongside each other. The differences are only syntactical.
Genie's syntax is derived from numerous modern languages like Python
, Boo, D
and Delphi. In the vein of Python, Genie uses whitespace
rather than curly brackets to delimit blocks.
Like Vala, Genie uses the GObject
type system to create classes and interfaces declared in Genie source code, without imposing additional runtime requirements (i.e., unlike Python, Java
or C#, it does not require a virtual machine
).
Genie allows access to C
libraries, especially those based in GObject (like GTK+
), without using a different ABI
. During compilation
, the code is first translated to C source and header files which are then compiled to platform-specific machine code using any available C compiler like GCC
, thus allowing cross-platform
software development.
Although both Vala and Genie are being developed and promoted by GNOME
, programs developed in Genie don't depend on the GNOME Desktop Environment, usually requiring only GLib
.
"Hello World
This sample explicitly uses four spaces for indentation.
High-level programming language
A high-level programming language is a programming language with strong abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or be from the specification of the program, making the process of...
in active development since 2008. It was designed as an alternative, simpler and cleaner dialect for the Vala
Vala (programming language)
Vala is a programming language created with the goal of bringing modern language features to C, with no added runtime needs and with little overhead, by targeting the GObject object system. It is being developed by Jürg Billeter and Raffaele Sandrini. The syntax borrows heavily from C#...
compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...
, while preserving the same functionality of the Vala language. Genie uses the same compiler and libraries as Vala, the two can indeed be used alongside each other. The differences are only syntactical.
Genie's syntax is derived from numerous modern languages like Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...
, Boo, D
D (programming language)
The D programming language is an object-oriented, imperative, multi-paradigm, system programming language created by Walter Bright of Digital Mars. It originated as a re-engineering of C++, but even though it is mainly influenced by that language, it is not a variant of C++...
and Delphi. In the vein of Python, Genie uses whitespace
Whitespace (computer science)
In computer science, whitespace is any single character or series of characters that represents horizontal or vertical space in typography. When rendered, a whitespace character does not correspond to a visual mark, but typically does occupy an area on a page...
rather than curly brackets to delimit blocks.
Like Vala, Genie uses the GObject
GObject
The GLib Object System, or GObject, is a free software library providing a portable object system and transparent cross-language interoperability...
type system to create classes and interfaces declared in Genie source code, without imposing additional runtime requirements (i.e., unlike Python, Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
or C#, it does not require a virtual machine
Virtual machine
A virtual machine is a "completely isolated guest operating system installation within a normal host operating system". Modern virtual machines are implemented with either software emulation or hardware virtualization or both together.-VM Definitions:A virtual machine is a software...
).
Genie allows access to C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
libraries, especially those based in GObject (like GTK+
GTK+
GTK+ is a cross-platform widget toolkit for creating graphical user interfaces. It is licensed under the terms of the GNU LGPL, allowing both free and proprietary software to use it. It is one of the most popular toolkits for the X Window System, along with Qt.The name GTK+ originates from GTK;...
), without using a different ABI
Application binary interface
In computer software, an application binary interface describes the low-level interface between an application program and the operating system or another application.- Description :...
. During compilation
Compiled language
A compiled language is a programming language whose implementations are typically compilers , and not interpreters ....
, the code is first translated to C source and header files which are then compiled to platform-specific machine code using any available C compiler like GCC
GNU Compiler Collection
The GNU Compiler Collection is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain...
, thus allowing cross-platform
Cross-platform
In computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms...
software development.
Although both Vala and Genie are being developed and promoted by GNOME
GNOME
GNOME is a desktop environment and graphical user interface that runs on top of a computer operating system. It is composed entirely of free and open source software...
, programs developed in Genie don't depend on the GNOME Desktop Environment, usually requiring only GLib
GLib
GLib is a cross-platform software utility library that began as part of the GTK+ project. However, before releasing version 2 of GTK+, the project's developers decided to separate non-GUI-specific code from the GTK+ platform, thus creating GLib as a separate product...
.