3 ms·
I wish Zig had lovely vector, quaternion, matrix etx syntax. The team's refusal to add operator overloading will prevent this.
by the__alchemist 1y ago
I wish Zig had lovely vector, quaternion, matrix etx syntax. The team's refusal to add operator overloading will prevent this.
- flohofwoe 1y agoYou don't need operator overloading for vector and matrix math, see pretty much all GPU languages. What Zig is missing is a complete mapping of the Clang Extended Vector and Matrix extensions (instead of the quite limited `@Vector` type): https://clang.llvm.org/docs/LanguageExtensions.html#vectors-and-extended-vectors https://clang.llvm.org/docs/LanguageExtensions.html#vectors-... https://clang.llvm.org/docs/LanguageExtensions.html#matrix-types https://clang.llvm.org/docs/LanguageExtensions.html#matrix-t...
- renox 1y agoAgreed, their reason for not allowing it is weird. No hidden overloading? OK make it explicit then: #+, #/ would be fine.
- Cyph0n 1y agoThat would open a can of worms, because then the next thing would use a different symbol. AFAIK, Scala had a huge issue with random symbols polluting code readability.
- renox 1y agoThat's not a reasonable objection, each proposal must be evaluated on its own, not on other non existing future proposal.