Zig is an open source programming language created in 2015 by Andrew Kelley.
| #41on PLDB | 11Years Old | 4kRepos |
git clone https://github.com/ziglang/zigA programming language designed for robustness, optimality, and clarity.
// Type your code here, or load an example.
export fn square(num: i32) i32 {
return num * num;
}
const std = @import("std");
pub fn main() anyerror!void {
std.log.info("Hello, world!", .{});
}
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
try stdout.print("Hello World", .{});
}| Feature | Supported | Example | Token |
|---|---|---|---|
| Comments | ✓ | ||
| Line Comments | ✓ | ||
| Binary Literals | ✓ | ||
| Integers | ✓ | ||
| Floats | ✓ | ||
| Hexadecimals | ✓ | ||
| Octals | ✓ | ||
| Strings | ✓ | "Hello world" | " |
| Print() Debugging | ✓ | std.debug.print |