My only significant use of Zig so far is as a nicer way to interface with C libraries, specifically the forthcoming SDL3. And for that it's kind of perfect. The build system is so much better than...
My only significant use of Zig so far is as a nicer way to interface with C libraries, specifically the forthcoming SDL3. And for that it's kind of perfect. The build system is so much better than writing janky makefiles and I appreciate the compiler's sensible defaults. I also like that the language itself is documented on a single big web page. Zig feels a lot more approachable to me than some of the other C replacement languages out there.
Also, lesser known, but certainly documented. For browsing the standard library you can run zig std (iirc) and it'll host it locally as a webpage. It uses WebAssembly n things for search I think.
Also, lesser known, but certainly documented. For browsing the standard library you can run zig std (iirc) and it'll host it locally as a webpage.
Whenever i tried Zig, its syntax is so full of stuff that I cant remember how to work with it. It feels way more complicated than it should be. On top of that, it's far from stable so code you...
Whenever i tried Zig, its syntax is so full of stuff that I cant remember how to work with it. It feels way more complicated than it should be.
On top of that, it's far from stable so code you write today may just break tomorrow.
Still, it's on my re-try list whenever it stabilizes more. I am currently using Odin and having tons of fun with it.
I think you mean the compilation, cause the standard library moves around a bit every version. I think a major downside is that the only reliable way to learn how to use things is to jump into the...
On top of that, it's far from stable so code you write today may just break tomorrow.
I think you mean the compilation, cause the standard library moves around a bit every version.
I think a major downside is that the only reliable way to learn how to use things is to jump into the standard library source code. Which can be intimidating at first if the syntax feels too verbose.
\\ Sure, yeah, everyone on tech forums post about Zig and heaps about how great it is (or how much "better" a certain dark-souls level crustacean compiler boss might compare), but this is really one of the first articles I read that had me interested in the language and convinced me to seriously start using it in all my projects.
\\
\\ C became one of my favorite languages over the last decade, especially during the great pandemic, but I think Zig might take that crown for the time being. Zig just feels like what C17/C23 would have ended up becoming in another universe, it's great.
\\
\\ Side note: If Odin had more support, I would love to throw everything I have at it. Such a better (fresh) language design, after spending some more time in Zig, I might start writing similar utilities I see in Zig into Odin if I can find the time to add to that repository of information and packages for them.
You've got an undefined symbo there, general_purpose_allocator. Also, gpa.deinit() returns a value that explicitly must be discarded. defer _ = gpa.deinit(); ...and the print statement seems to...
You've got an undefined symbo there, general_purpose_allocator.
Also, gpa.deinit() returns a value that explicitly must be discarded.
defer _ = gpa.deinit();
...and the print statement seems to simple to be Zig, I'm sure that writer is meant to be var and doesn't return a function.
Also I think we can all agree the literal string syntax you used here should be in more languages.
Considering I wrote this up on my phone, we should be incredibly lucky that this is even passable. lol. But that undefined is driving me crazy, going to edit that and leave the rest... errors and all.
Considering I wrote this up on my phone, we should be incredibly lucky that this is even passable. lol.
But that undefined is driving me crazy, going to edit that and leave the rest... errors and all.
My only significant use of Zig so far is as a nicer way to interface with C libraries, specifically the forthcoming SDL3. And for that it's kind of perfect. The build system is so much better than writing janky makefiles and I appreciate the compiler's sensible defaults. I also like that the language itself is documented on a single big web page. Zig feels a lot more approachable to me than some of the other C replacement languages out there.
Also, lesser known, but certainly documented. For browsing the standard library you can run
zig std
(iirc) and it'll host it locally as a webpage.It uses WebAssembly n things for search I think.
Whenever i tried Zig, its syntax is so full of stuff that I cant remember how to work with it. It feels way more complicated than it should be.
On top of that, it's far from stable so code you write today may just break tomorrow.
Still, it's on my re-try list whenever it stabilizes more. I am currently using Odin and having tons of fun with it.
I think you mean the compilation, cause the standard library moves around a bit every version.
I think a major downside is that the only reliable way to learn how to use things is to jump into the standard library source code. Which can be intimidating at first if the syntax feels too verbose.
\\ Sure, yeah, everyone on tech forums post about Zig and
heaps
about how great it is (or how much "better" a certain dark-souls level crustacean compiler boss might compare), but this is really one of the first articles I read that had me interested in the language and convinced me to seriously start using it in all my projects.\\
\\ C became one of my favorite languages over the last decade, especially during the great pandemic, but I think Zig might take that crown for the time being. Zig just feels like what C17/C23 would have ended up becoming in another universe, it's great.
\\
\\ Side note: If Odin had more support, I would love to throw everything I have at it. Such a better (fresh) language design, after spending some more time in Zig, I might start writing similar utilities I see in Zig into Odin if I can find the time to add to that repository of information and packages for them.
You've got an undefined symbo there,
general_purpose_allocator
.Also,
gpa.deinit()
returns a value that explicitly must be discarded.defer _ = gpa.deinit();
...and the print statement seems to simple to be Zig, I'm sure that writer is meant to be
var
and doesn't return a function.Also I think we can all agree the literal string syntax you used here should be in more languages.
Considering I wrote this up on my phone, we should be incredibly lucky that this is even passable. lol.
But that undefined is driving me crazy, going to edit that and leave the rest... errors and all.
There's also an
_ = heaps;
missing, since otherwise it's an unused local constant. 🙂What sort of projects have you been using Zig (or Odin) for?
It now has both, albeit they axed
async
as a language feature to do it..It might return, maybe, at some point..