4 ms·
> Though, it looks like Zig doesn't do function overloading either [1]. That's a disappointment. So you end up with `array_count`, `map_count`, etc instead of j
by kristoff_it 4y ago
> Though, it looks like Zig doesn't do function overloading either [1]. That's a disappointment. So you end up with `array_count`, `map_count`, etc instead of just `count`. In my way of thinking that's more work reduces readability. It's one of the paint points of C vs C++ to need `array_list_count` and `hash_map_add` instead of just saying `vec.insert(...)`.
Zig doesn't have function overloading but it does have namespaced functions, so you can define your types and your "methods" on them.
https://ziglang.org/documentation/master/#struct https://ziglang.org/documentation/master/#struct