3 ms·
<> are obviously already used for less than/greater than, so they're disqualified too by this logic. If you broaden your viewpoint, [] is the same thing for ar
by edflsafoiewq 4y ago
<> are obviously already used for less than/greater than, so they're disqualified too by this logic.
If you broaden your viewpoint, [] is the same thing for arrays and generics. A generic function is a family of functions parameterized by types; an array is a family of values parameterized by 0..n; [] selects one member of the family. In fact in math subscripting is already a common notation for the parameter of a generic.
Same for paths using dot, it's just member access on a module object. In languages like JS or Python it's literally just normal runtime member access. In Zig it's also just normal member access on a comptime object.