|
|
|
|
|
by gracefulliberty
8 hours ago
|
|
Everything it's doing it clear and readable. It's just not as easy to write. It streams the bytes to stdout using the default IO interface, and it can fail. Alternatively, here's a simpler version (prints to stderr). const std = @import("std");
pub fn main() void {
std.debug.print("Hello, world!\n", .{});
}
In practice, you normally don't want to print messages to stdout. So the increased friction here actually pushes you in a better direction. |
|