Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Zig

< >

Zig is an open source programming language created in 2015 by Andrew Kelley.

#45on PLDB 9Years Old 4kRepos
Download source code:
git clone https://github.com/ziglang/zig
Homepage · REPL · Try It Online · Source Code · Blog · Wikipedia · Subreddit · FAQ · Release Notes · Docs

A programming language designed for robustness, optimality, and clarity.


Example from Compiler Explorer:
// Type your code here, or load an example. export fn square(num: i32) i32 { return num * num; }
Example from Riju:
const std = @import("std"); pub fn main() anyerror!void { std.log.info("Hello, world!", .{}); }
Example from hello-world:
const std = @import("std"); pub fn main() !void { const stdout = std.io.getStdOut().writer(); try stdout.print("Hello World", .{}); }

Language features

Feature Supported Example Token
Comments
Line Comments
Binary Literals
Integers
Floats
Hexadecimals
Octals
Strings "Hello world" "
Print() Debugging std.debug.print

- Build the next great programming language · Add · Issues · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements

Built with Scroll v154.3.0