Zig (programming language)

Zig
ParadigmsMulti-paradigm: imperative, concurrent, procedural, functional
Designed byAndrew Kelley
First appeared8 February 2016 (2016-02-08)[1]
Preview release
0.12.0[2] Edit this on Wikidata / 20 April 2024 (20 April 2024)
Typing disciplineStatic, strong, inferred, structural, generic
Memory managementManual
Platformx86-64, ARM64, WebAssembly
Tier 2: ARM, IA-32, RISC-V, MIPS64, POWERPC64, SPARC64, some tier-2 platforms have tier-1 support for standalone programs
OSCross-platform: Linux, FreeBSD, Windows
LicenseMIT
Filename extensions.zig, .zir
Websiteziglang.org
Influenced by
C, C++, LLVM IR, Go, Rust, JavaScript[citation needed]

Zig is an imperative, general-purpose, statically typed, compiled system programming language designed by Andrew Kelley.[3] It is intended as a successor to the language C, with the intent of being even smaller and simpler to program in, while offering more function.[4] It is free and open-source software, released under an MIT License.

The improvements in language simplicity relate to flow control, function calls, library imports, variable declaration and Unicode support. Further, the language makes no 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 built into the language.

  1. ^ Kelley, Andrew. "Introduction to the Zig Programming Language". andrewkelley.me. Retrieved 8 November 2020.
  2. ^ "Release 0.12.0".
  3. ^ "Taking the warts off C, with Andrew Kelley, creator of the Zig programming language". Sourcegraph. 2021-10-19. Retrieved 2024-04-18.
  4. ^ "Zig has all the elegant simplicity of C, minus all the ways to shoot yourself in the foot". JAXenter. 2017-10-31. Archived from the original on 2017-11-01. Retrieved 2020-02-11.

From Wikipedia, the free encyclopedia · View on Wikipedia

Developed by Nelliwinne