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!
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
@kimau I don't know about golang, but as a human with a happy place of mostly the C subset of C++, I find Zig to be great. Comptime does anything I would use macros/templates for, I like the stdlib choices, and you can directly call into C libs.
Just be aware that the language is unstable, in particular lots of breaking standard library changes coming in 0.16 for io.