@lunathemoongirl@cailincat.cloud
2026-03-24 04:07 UTC
@desttinghim@gamedev.lgbt coming from a language with first class linear algebra support that sounds a bit scary but it's probably not that annoying when making things that don't consist of 90% vector math like games? ^^
Hmm I heard one of the big features is also lots of compiletime execution?
Replies (1)
-
@desttinghim@gamedev.lgbt 2026-03-24 19:18
@lunathemoongirl@cailincat.cloud yeah, compile time code execution (comptime for short) is used a lot in zig, for conditional compilation, generic data types, and type reflection. For example, the growable array in zig's standard library is a function that takes a type and returns a type. If you wanted a list of u8s, you would use std.ArrayList(u8). One of the quirky language features that enables this is lazy compilation. Zig won't analyze code unless it is actually used.