2 ms·
In C++ I ever only used operator overloading for vector/matrix math (where it is indeed very useful). I'd be fine if a language implements the vector math synta
by flohofwoe 2y ago
In C++ I ever only used operator overloading for vector/matrix math (where it is indeed very useful). I'd be fine if a language implements the vector math syntax directly (like shading languages do). Zig at least has a @Vector() [1] type which is a bit similar to Clang's Vector Extension (but unfortunately not the Extended Vector Extension) [2].
[1] https://ziglang.org/documentation/master/#Vector https://ziglang.org/documentation/master/#Vector
[2] https://clang.llvm.org/docs/LanguageExtensions.html#vectors-and-extended-vectors https://clang.llvm.org/docs/LanguageExtensions.html#vectors-...