4 ms·
Ask HN: What are the main difference between Zig, Hare and V?
- deleted 4y ago[deleted]
- dejj 4y agoI have not heard of Hara or V. Can you please provide explanatory links?
- iio7 4y agoSorry, made a typo with "hara", I meant "hare". Hare: https://harelang.org/ https://harelang.org/ V: https://vlang.io/ https://vlang.io/ Zig: https://ziglang.org/ https://ziglang.org/
- nyberg 4y agoZig 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.