Re:Why Zig over C for Systems Programming
by cornstalks on Friday November 13, 2026 @12:00PM
(#50486336)
You can do a+b in Zig with SIMD vectors. No operator overloading required
[ Parent
| on HN ]
Re:Why Zig over C for Systems Programming
by ogogmad on Friday November 13, 2026 @12:16PM
(#50486576)
Sure. But doesn't it still lack autodiff, quaternions, etc?
Re:Why Zig over C for Systems Programming
by cornstalks on Friday November 13, 2026 @01:46PM
(#50487934)
Yes, there are definitely other use cases that Zig doesn't support (which some may view as a good or bad thing). I just wanted to respond to the comment about basic SIMD since the example was U8x32 and operator+, which Zig can do.
Point wasn't about SIMD, but defining my wrapper for it and giving it operations I needed.
Which seems to be something Zig can't do.
Hell, you can define operators for generic length SIMD lane.
Same goes for any bitwise operation <<, >>, &, |, %.
Can I write my SIMD/number abstraction and have it work?
Let's say I need rotors. With six dimensions. Can I overload it's basic numeric operations?