3 ms·
Zig comptime would be one of the major features which provides most of the language at compilation time for use in metaprogramming, conditional compilation (e.g
by nyberg 4y ago
Zig comptime would be one of the major features which provides most of the language at compilation time for use in metaprogramming, conditional compilation (e.g `if (target == .windows) {}`), generics, and many other use cases for partial evaluation. This is used within the standard library to provide generic containers and, in the case of std.MultiArrayList, compute a more compact memory layout for the type you've given using plain zig code at compile-time.
Another would be the standard library design which in zig, focuses on giving the user control over allocations by having a pass-the-allocator interface for everything that would allocate memory rather than a single global allocator as is present in both Hare and V from what I can tell. This allows for the non-os specific parts of the standard library to be used on freestanding targets without having to reimplement std.HashMap for it to work with a new allocator.