Genie (programming language)


Genie is a modern, general-purpose high-level programming language in 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 syntactic.
Genie's syntax is derived from numerous modern languages like Python, Boo, D and Delphi. In the vein of Pascal and Python, Genie uses indentation 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.
Genie allows access to C libraries, especially those based in GObject, without using a different application binary interface. 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.
Programs developed in Vala and Genie don't depend on the GNOME Desktop Environment, usually requiring only GLib.

Code samples

"Hello World"

This sample explicitly uses four spaces for indentation.

init
print "Hello, world!"

Objects

With no explicit indentation declaration, the default is tabs.

class Sample
def run
stdout.printf
init
var sample = new Sample
sample.run

Critique

, Genie for loops are inclusive, which makes handling of empty lists cumbersome:
However, the lists can be iterated using for-in construct easily and straightforward: