Re:Show HN: The C3 programming language (C alternative langu...
by lerno on Friday April 04, 2025 @06:38PM
(#43588479)
C3 allows arbitrary extensions of any types, so things like `vec1.dot(vec2)` is actually implemented as a generic method macro over all vector types added by the math module.
Given Zig's preference for closed modules, I don't expect this to be on the roadmap, but rather would need to be implemented as functions.
But, yes, you won't get overloading allowing things like dot, cross, or scalar products. And I do miss the swizzle notation, but I don't think the language actually prevents that so it might appear at some point.