Zig



Website: ziglang.org

Designed by: Andrew Kelley

Programming paradigms: Multi-paradigm — imperative, concurrent, procedural, functional


Zig is an imperative, general-purpose, statically typed, compiled system programming language designed by Andrew Kelley.

It is intended to be a replacement for the C programming language, with the goals of being even smaller and simpler to program in while also offering modern features, new optimizations and a variety of safety mechanisms while not as demanding of runtime safety as seen in other languages.

It is distinct from languages like Go, Rust and Carbon, which have similar goals but also target the C++ space.The improvements in language simplicity relate to flow control, function calls, library imports, variable declaration and Unicode support.

Additionally, the language does not make use of macros or preprocessor instructions.

Features adopted from modern languages include the addition of compile-time generic types, allowing functions to work on a variety of data, along with a small set of new compiler directives to allow access to the information about those types using reflection.

Another set of additions to Zig is intended to improve code safety.

Like C, Zig does not include garbage collection and memory handling is manual.

To help eliminate the potential errors that arise in such systems, it includes option types and simple syntax for using them.

A testing framework is also designed into the language.