Main / News / ZIG joins the party
C++ was and is the superior programming language, because it can directly use the most important programming language: C.
Other languagues bring their unique improvements, but they all become complex, when it comes to interacting with C code (and of course the OS APIs, which are written C too).
But there is one newcomer, that can compete with C++ regarding C-flexibility:
The ZIG programming language.
ZIG code looks like simplified Rust or even Python code. It does not implement all heavy-weighted OOP flavors, but adds basic memory-safety features.
Regarding the GATE project, ZIG brings two major benefits:
- ZIG is a full C compiler for all standard platforms
- ZIG modules can directly include C headers and static/shared libraries
ZIG as a C compiler
ZIG is based on and contains the LLVM backend, including bindings to all
major C runtime libraries that are in the fields today.
Cross-compiling is a zero-cost feature as all required dependencies are
already part of the ZIG compiler.
Therefore the GATE framework can be built with ZIG as its standard compiler.
C compatibility
But the really great stuff is: Every GATE C header can directly be used inside ZIG programs.
The new goal is now to write a slim ZIG-wrapper library that covers
native GATE-C-calls into an easy to use ZIG module.
It’s the same strategy we use in GATE C++, which just offers us a
nice interface to the underlaying C codes.