Английская Википедия:Genie (programming language)
Шаблон:Distinguish Шаблон:Infobox programming language Шаблон:Portal Genie is a modern, general-purpose high-level programming language in development since 2008.[1] 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.[2] The differences are only syntactic.
Genie's syntax is derived from numerous modern languages like Python, Boo, D and Delphi. In the vein of Python, Genie uses indentation rather than explicit block delimiters (like, for example, 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 application binary interface (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.
Programs developed in Vala and Genie do not depend on the GNOME Desktop Environment, usually requiring only GLib.
Code samples
"Hello World"
This sample explicitly uses four spaces for indentation.
[indent=4] init print "Hello, world!"
Objects
With no explicit indentation declaration, the default is tabs.
class Sample def run() stdout.printf("Hello, world! \n ") init var sample = new Sample() sample.run()
Criticism
Шаблон:Multiple issues Шаблон:As of, Genie "for" loops are inclusive, which makes handling of empty lists cumbersome:[3]
However, one can also iterate over lists via the for-in construct. This is easy and straightforward:[4]
References
External links
- Шаблон:Official website
- Шаблон:Webarchive
- Using the Genie programming language under Puppy Linux
- Puppy Linux: Vala and Genie Programming
- API Documentation
- search github projects written in genie
Шаблон:Programming languages Шаблон:GNOME
- Английская Википедия
- 2008 software
- Cross-platform free software
- GTK language bindings
- High-level programming languages
- Object-oriented programming languages
- Programming languages created in 2008
- Software using the LGPL license
- Statically typed programming languages
- Страницы, где используется шаблон "Навигационная таблица/Телепорт"
- Страницы с телепортом
- Википедия
- Статья из Википедии
- Статья из Английской Википедии