3 ms·
In other words, Zig is closer to the original C and maybe Scheme, while C3 and Odin tend towards maybe Ruby (while of course remaining capable of doing low-lev
by nine_k 2y ago
In other words, Zig is closer to the original C and maybe Scheme, while C3 and Odin tend towards maybe Ruby (while of course remaining capable of doing low-level stuff). Correct?
- Joshringuk 2y agoI have found C3 to be a generally simpler experience than Zig, it's fun to use while being low level. The general approach is aiming to be easy to use, personally I often compare it to Go philosophically but with more similar use cases to C and lower level.
- lerno 2y agoBack in the day when C's closest competitor was Pascal, C wasn't particularly hard to use. Pascal was easier for manipulating strings and C better at doing low level data manipulation. But at the time there was little need for high level abstractions, and it was fine to just allocate an array with N number of entries and that was the maximum the program allowed. Today we're dynamically allocating memory with intricate relationships, especially in object oriented programming. This makes C look really hard to use – but it can actually be much improved with just an improved string library and a good dynamic array. But there are also cross platform concerns for things like networking and here C offers little to help. Regardless whether you're using Zig, C3 or Odin you're going to have a much easier time than C with straight up libc. So I think a better comparison is that Zig is a bit like using the C++ containers. If you've ever struggled to mutate a std::vector while iterating over it, you know it's a bit complicated to figure out exactly what functions fit where. The final solution might be performant, but it's a lot more to remember than say `iterator.remove_element()` that you might encounter in some other language. However, it does offer more ways to tweak it, and it's very explicit in what happens.