One thing I miss in #Zig compared with shaders/clang ext_vector is postfix syntax for vector swizzles.

So, weekend experiment as a compiler noob: can I locally modify the compiler to allow postfix syntax via a kind of vector gather op? Answer: yes!

The #Zig folks understandably do not want language proposals from outside their core team, so this is just a local experiment.

I was surprised how easy it was to just start hacking on the compiler though! Code changes are here if anyone is interested: https://codeberg.org/sjb3d/zig/compare/bbc77df..vector-gather-shuffle

zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

Codeberg.org