Aviva Directory » Computers & Internet » Programming » Zig

Created in 2016 by Andrew Kelley, Zig is a programming language designed to be pragmatic, optimal, safe, and readable. At least, these are the goals set by its author.

As one of the newer programming languages, Zig is not yet in wide use, but Kelley's goal was for it to do what the programmer is trying to do better than any other language. In particular, Kelley hopes that his new language will compete favorably with the C family of languages while recognizing the reasons for the success of C.

Zig offers rapid runtime performance, and it avoids complicated syntax, offering a canonical way of accomplishing programming objectives.

Zig is a general-purpose language that highlights its size. As a small, simple language, programmers can focus on debugging applications rather than on learning complex syntax. Licensed under an MIT License, the language ships with a build system that does not require a configure script or makefile.

Zig's method of error handling is intended to make writing correct code easier than writing buggy code. Its debug mode optimizes for fast compilation time and crashes with a stack trace when undefined behavior would occur.

Its ReleaseFast mode produces heavily optimized code, performing the equivalent of link-time optimization automatically.

Zig code is compatible with C libraries without the need for a wrapper. A standard library is provided that competes with the C standard library and is always compiled against statically in source form. Zig binaries are not dependent on libc unless explicitly linked. Zig uses safe unions, tagged unions, and C ABI (application binary interface) compatible unions.

The binaries produced by Zig include complete debugging information, allowing programmers to use GDB, MSVC, or LLDB to debut software.

Cross-compiling is a primary use case. In addition to creating executables, creating a C library is a primary use case, and programmers can export an auto-generated .h file.

Zig may be installed on all forms of Linux distributions, including Arch Linux, CentOS, Debian, Elementary OS, Fedora, KDE Neon, Kubuntu, Manjaro, Linux Mint, OpenSUSE, Red Hat Enterprise Linux, and Ubuntu.

The focus of this guide is on the Zig programming language, as well as any editors or tools designed to facilitate programming in Zig. User groups, forums, tutorials, and guides are also appropriate for this category.

 

 

Recommended Resources


Search for Zig on Google or Bing