HACKER Q&A
📣 iio7

What are the main difference between Zig, Hare and V?


What are the main difference between Zig, Hare and V?


  👤 nyberg Accepted Answer ✓
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.


👤 iio7
Sorry, made a typo with "hara", I meant "hare".

Hare: https://harelang.org/

V: https://vlang.io/

Zig: https://ziglang.org/


👤 dejj
I have not heard of Hara or V. Can you please provide explanatory links?