Category:Zig
Appearance

This programming language may be used to instruct a computer to perform a task.
Official website |
---|
Execution method: | Compiled (machine code) |
---|---|
Garbage collected: | No |
Parameter passing methods: | By value |
Type safety: | Unsafe |
Type strength: | Strong |
Type compatibility: | Nominative |
Type expression: | Explicit |
Type checking: | Static |
Lang tag(s): | zig |
See Also: |
|
Zig is an open-source programming language designed for robustness, optimality, and clarity.
Zig is under active development at its Github repository. Solutions for RosettaCode tasks can also be found in the zig-rosetta repository.
Features
From the official website:
- Manual memory management. Memory allocation failure is handled correctly. Edge cases matter!
- Zig competes with C instead of depending on it. The Zig Standard Library does not depend on libc.
- Small, simple language. Focus on debugging your application rather than debugging your knowledge of your programming language.
- A fresh take on error handling that resembles what well-written C error handling looks like, minus the boilerplate and verbosity.
- Debug mode optimizes for fast compilation time and crashing with a stack trace when undefined behavior would happen.
- ReleaseFast mode produces heavily optimized code. What other projects call "Link Time Optimization" Zig does automatically.
- ReleaseSafe mode produces optimized code but keeps safety checks enabled. Disable safety checks in the bottlenecks of your code.
- Generic data structures and functions.
- Compile-time reflection and compile-time code execution. No preprocessor.
- Concurrency via coroutines. Async/await is thread-safe, non-blocking, and makes no syscalls, and therefore available in freestanding mode. You can multiplex coroutines onto a thread pool in userland for M:N concurrency.
- Import .h files and directly use C types, variables, and functions.
- Export functions, variables, and types for C code to depend on. Automatically generate .h files.
- Optional type instead of null pointers.
- Order independent top level declarations.
- Friendly toward package maintainers. Reproducible build, 3-step bootstrapping process.
- Cross-compiling is a first-class use case.
Pages in category "Zig"
The following 200 pages are in this category, out of 219 total.
(previous page) (next page)A
- A* search algorithm
- A+B
- ABC correlation
- Ackermann function
- Address of a variable
- Aho–Corasick algorithm
- AKS test for primes
- Amicable pairs
- Animate a pendulum
- Anti-primes
- Apply a callback to an array
- Arbitrary-precision integers (included)
- Arithmetic/Integer
- Array concatenation
- Array length
- Assertions
B
C
- Caesar cipher
- Calculating the value of e
- Call a foreign-language function
- Call an object method
- Case-sensitivity of identifiers
- Catalan numbers/Pascal's triangle
- Catamorphism
- Character codes
- Check if two polygons overlap
- Christofides algorithm
- Cipolla's algorithm
- Circular primes
- Code Golf: Code Golf
- Combinations and permutations
- Command-line arguments
- Comments
- Compile-time calculation
- Compiler/AST interpreter
- Compiler/code generator
- Compiler/lexical analyzer
- Compiler/syntax analyzer
- Compiler/virtual machine interpreter
- Conditional structures
- Convex hull
- Conway's Game of Life
- Coprime triplets
- Copy a string
- CORDIC
- Count in octal
- Count occurrences of a substring
- CRC-32
- CUSIP
D
E
F
G
H
L
- Latin Squares in reduced form
- Leap year
- Levenshtein distance
- Loop over multiple arrays simultaneously
- Loops/Break
- Loops/Continue
- Loops/Do-while
- Loops/Downward for
- Loops/For
- Loops/For with a specified step
- Loops/Foreach
- Loops/Increment loop index within loop body
- Loops/Infinite
- Loops/N plus one half
- Loops/While
- Loops/Wrong ranges
- Lucas-Lehmer test
M
N
P
- P-Adic numbers, basic
- P-Adic square roots
- Parametric polymorphism
- Parsing/RPN calculator algorithm
- Parsing/Shunting-yard algorithm
- Pell's equation
- Perfect numbers
- Perlin noise
- Pick random element
- Pollard's rho algorithm
- Polyspiral
- Prime numbers of measurement
- Prime triplets
- Primes whose sum of digits is 25
- Priority queue
- Program name
R
S
- Safe mode
- Self-describing numbers
- SHA-1
- Show ASCII table
- Sierpinski triangle
- Sieve of Eratosthenes
- Singly-linked list/Element definition
- Singly-linked list/Element insertion
- Singly-linked list/Traversal
- Sisyphus sequence
- Sleep
- Smallest square that begins with n
- Solve a Holy Knight's tour
- Solve the no connection puzzle
- Sort using a custom comparator
- Sorting algorithms/Patience sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Strand sort
- Sorting algorithms/Tree sort on a linked list
- Special divisors
- Strassen's algorithm
- String case