Seeing that integers and booleans have their type declaration to the left of the equal sign after a double colon:
var int: u8 = 4;
var toggle: bool = undefined;
I tried, just for sake of a better understanding, to replicate this for string literals and arrays:
const where_is_my_base: *const [7:0]u8 = "ask_zig";
const array: [3]u8 = [_]u8{ 1, 2, 3 }
But leaving off the []u8 part fails. Altough remember seeing it used somewhere, maybe by mistake?
Anyway, someone told me this []u8 is not the type, but what is it then? And why is it essential to add it to the right of the equal sign this time... while other types do this to the left? I'm realising the zig devs made very conscious decisions all around, so i'd like to know the reasoning behind this. Who enlightens me? 😉