by epolanski · 5mo ago · 0 comments
Don't get me wrong, I love Zig and I think it's a great C replacement, but I'm very confused on why C3 or Odin rarely get any attention at all, despite being in the same C-replacement crowd.
But still surprised at what Zig does better than these other projects? Is Andrew much better at marketing/promoting the language? He's very hard to dislike.
C3 uses :: for namespaces, that makes it a competitor with C++ more than C. Equally Odin's syntax is more at home among python, not systems programming.
The appeal of Zig is it feels like C. To many people, this is a downside. C is very very scary to them. But for people who feel at home in C, it's not a downside.
Additionally, the selling point for both are "c replacement" where the selling point of Zig is "good systems programming language" C is only mentioned by it's users as a heuristic.
If 2 groups are trying to replace a language that people are running away from, and that's their best selling point... I'd assume they're less likely to be as successful as a different language just trying to be as good as it can be.
I've even stopped comparing Zig to C, IMO, it does a disservice to both. And I say that as someone who likes C.
Full disclosure, I need to spend a bit more time with both odin and c3 to know exactly how this compares. But the reason I keep writing Zig, and still love it, is how simple it is. Zig is aggressively insistant on simplicity at the expense of functionally or comfort. The only other high level language I know of that is as aggressive about it's design simplicity is infact C. While I assume it's an accident when C does it, it's definitely not an accident in Zig.
Those other competing languages get censored or disappear, however, whatever kind of Zig article that is submitted appears to get heavily pushed and promoted on HN. No matter how much blatant marketing propaganda that it is or that it's coming directly from the language's site or team (as oppose to a reputable 3rd party source).
Sometimes its just right time, right place. But also, Zig has received attention via projects like Ghostty, TigerBeetle, and Bun (prior to rewrite of course)
Your observation is valid, and many would say because something smells very fishy with what HN is doing. Zig is pushed at extremely nonsensical levels on HN, despite there being very worthy and interesting language contenders in the category: C3[1], Odin[2], Vlang[3], Dlang[4], Zen C[5], etc...
We rarely get to see news about these other languages, but instead are constantly saturated with and hit over the head with news about Zig (despite all kinds of issues and being beta). And as if people don't have interests in or don't want to see anything about other young or newer languages in the category.
[1]: https://github.com/c3lang/c3c
[2]: https://github.com/odin-lang/odin
[3]: https://freedium-mirror.cfd/https://levelup.gitconnected.com...
(The V Language: The Best Parts of Go, Rust, and Python — All in One)
[4]: https://freedium-mirror.cfd/https://levelup.gitconnected.com...
(The D Language: A Better C/C++ Alternative Only a Few Programmers Know)
Maybe the best marketing is to establish your vision and stick to it over the years ?
In any case c3 didn't exist, I had never stumbled on a talk of Odin's creator and its syntax seemed more foreign (I only knew C back then) so I started rooting for zig. Even though it's not 1.0 yet, zig seems more ambitious (incremental compilation ! comptime ! translate-c ! logical bitcasting !) and committed to the vision of C companion/replacement. That for me is enough to still be hyped ten years after.
Can I do that in C3 or Odin?
Proper enums, proper tagged unions, and often reading the docs can allow the AI to distinguish T * to one of
1. [*]T
2. [:0]T
3. ?T
4. *T
And these are just the most common ones. If you know it’s a read only pointer/array then you can add the const modifier
There is a mountain of code written in C that you can simply include in Zig without a wrapper dependency and without having to create the wrapper yourself.
C3 just has everything C compatible so not just calling into C but also C calling to C3 is just completely normal with no special compatibility types/functions, unlike Zig.
So which one has the most compelling feature kind of boils down to what one focuses on.
You can find Odin users that praise Odin for finding their sweet spot. Similarly for C3 users, just like Zig users.
And in each of those, they will say that the others didn’t quite match what they wanted (not in all cases though: the relatively high visibility of Zig means a lot of its users is unaware of the languages with less visibility, and just pick it by default)
Doesn't matter as neither will see significant adoption.
His politics don't matter to me. Hell, if the politics of technologists dictated whether I used their products, I'd have to go live in the wilds, without any tech. :-)