Zig (programming language)
A general-purpose programming language, toolchain to build Zig/C/C++ code / From Wikipedia, the free encyclopedia
Dear Wikiwand AI, let's keep it short by simply answering these key questions:
Can you list the top facts and stats about Zig (programming language)?
Summarize this article for a 10 year old
Zig is an imperative, general-purpose, statically typed, compiled system programming language designed by Andrew Kelley[citation needed]. It is intended to be a successor to the C programming language, with the intention of being even smaller and simpler to program in while also offering more functionality.[3]
This article contains content that is written like an advertisement. (January 2024) |
Paradigms | Multi-paradigm: imperative, concurrent, procedural, functional |
---|---|
Designed by | Andrew Kelley |
First appeared | 8 February 2016; 8 years ago (2016-02-08)[1] |
Preview release | |
Typing discipline | Static, strong, inferred, structural, generic |
Memory management | Manual |
Platform | x86-64, ARM64, WebAssembly Tier 2: ARM, IA-32, RISC-V, MIPS64, POWERPC64, SPARC64, some tier-2 platforms have tier-1 support for standalone programs |
OS | Cross-platform: Linux, FreeBSD, Windows |
License | MIT |
Filename extensions | .zig, .zir |
Website | ziglang |
Influenced by | |
C, C++, LLVM IR, Go, Rust, JavaScript[citation needed] |
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 built into the language.