u/__parad0x59

▲ 31 r/Zig

Just a minor thing I was wondering about (while learning Zig)


// If imports are done like this:

const std = @import("std");

// and structs are also done like this:

const Point = struct {
	x: f32, 
	y: f32
};

// then why is Zig not consistent so that we cannot also do:

const add = function (a: i32, b: i32) i32 {};

pub const main = function (init: std.process.Init) !void {};

const @"test 1" = test {

}
// and so on?
reddit.com
u/__parad0x59 — 1 day ago