7 ms·
After some thought, I think I know why this is irritating. The domains I imagine Zig would be suited for are also ones where I use vector operations regularly.
by the__alchemist 2y ago
After some thought, I think I know why this is irritating. The domains I imagine Zig would be suited for are also ones where I use vector operations regularly. Almost a 1:1 overlap:
- Embedded (Accelerations, velocities, positions)
- Robotics
- Games
- Performance-critical scientific and numerical code (Cosmology, computational chemistry etc)
- 3D graphics and visualizations
- otoburb 2y agoDid you try this with Julia too? Their vector & matrix support is literally first class.
- the__alchemist 2y agoHah yea. Julia's math syntax is the best I've seen, of any language. I wish rust and python etc had something similiar! Killer feature.
- cornstalks 2y agoZig has builtin support for vectors[1], which I think provides some alleviation. But sure, it's not as complete or flexible as a whole vector/matrix library. [1]: https://ziglang.org/documentation/master/#Vectors https://ziglang.org/documentation/master/#Vectors
- the__alchemist 2y agoGreat to know! From the description in that page and yours, it sounds like this is a related, but different concept. Specifically, that page includes use of a `Vec3` of the sort I was implementing, done with a `struct` and methods, vice @Vector.