Based in C and similar to Swift, Gravity offers portable code for iOS and Android
- 11 March, 2017 07:20
Gravity, an embeddable, lightweight programming language written in C, is an option for mobile application development while backing multiple programming variants.
Supporting data-driven, functional, object-oriented, and procedural programming, Gravity was built for Creo Lab's Creo design tool for the Mac, but it's a standalone product, developer Marco Bambini said. Currently in beta, open source Gravity enables developers to easily write portable code for iOS and Android. It also supports desktop and embeddable development.
A class-based concurrent scripting language with syntax similar to Swift, Gravity can be compiled on any platform using a C99 compiler, according to the project description. The compiler and virtual machine combined add fewer than 200KB to the executable on on a 64-bit system.
Bambini sees Gravity as complementary companion to Swift and Java development for mobile platforms. The language was supported by a pair of open source projects. The inspiration for closures comes from the Lua programming language; specifically from the "Closures in Lua" document, while the Wren concurrent scripting language inspired fibers, upvalues handling, and some parts of the garbage collector.