Earlier quoted context omitted.
I suspect most developers do not know C.
C is fine C++ is where they jumped the shark
Open-source Zig book
291–300 of 426 posts
Re: Open-source Zig book
#292Earlier quoted context omitted.
Can you provide some examples where the text reeks of AI?
https://www.zigbook.net/chapters/45__text-formatting-and-uni... The repetitiveness of the shell commands (and using zig build-exe instead of zig run when the samples consist of short snippets), the filler bullet points and section organization that fail to convey any actual conceptual structure. And ultimately throughout the book the general style of thought processes lacks any of the zig community’s cultural anachro…
Re: Open-source Zig book
#293Folks! do I really need learn Zig? I am already good with Rust!!
Not an expert but Zig seems like a modern C - you manage memory yourself. I guess if you want more modern features than C offers, and actively don't want the type-system sort of features that Zig has (or are grumpy about compile times, etc) then it's there for you to try!
Re: Open-source Zig book
#294Earlier quoted context omitted.
>Rust is that for C++ No it's not. Rust has roots in functional languages. It is completely orthoganol to C++.
Graydon Hoare, a former C++ programmer on Mozilla Firefox and the original creator of Rust, acknowledges that for many people, Rust has become a viable alternative to C++ : https://graydon2.dreamwidth.org/307291.html And on slide #4, he mentions that "C++ is well past expiration date" : https://venge.net/graydon/talks/intro-talk-2.pdf It's possible that Graydon's earliest private versions of Rust the 4 years prior to…
Alternative yes, derivative no. Rust doesn't approach C++'s metaprogramming features, and it probably shouldn't given how it seems to be used. It's slightly self-serving for browser devs to claim Rust solves all relevant problems in their domain and therefore eclipses C++, but to me in the scientific and financial space it's a better C, making tradeoffs I don't see as particularly relevant.
I say this as a past contributor to the Rust std lib.
Re: Open-source Zig book
#295Folks! do I really need learn Zig? I am already good with Rust!!
Yeah, you should. Zig is a trending language right now, and in the coming years many projects are likely to be rewritten in Zig instead of Rust (often referred to as "riiz").
Re: Open-source Zig book
#296Earlier quoted context omitted.
> if other languages that address one of the main rust claims without all the cruft But regardless of how much one likes Zig, it addresses none of the problems that Rust seeks to solve. It's not a replacement for Rust at all, and isn't suitable for any of the domains where Rust excels.
> and isn't suitable for any of the domains where Rust excels. That's a pretty bold claim since Zig is specifically designed for systems programming, low level stuff, network services, databases (think Tigerbeetle). It's not memory safe like Rust is, but it comes with constructs that make it simple to build largely memory safe programs.
There is some overlap but that's still different. The Zig approach to memory safety is to make everything explicit, it is good in a constrained environment typical of embedded programming. The Rust approach is the opposite, you don't really see what is happening, but there are mechanisms to keep your safe. It is good for complex software with lots of moving parts in an unconstrained environment, like a browser.
For a footgun analogy, one will hand you a gun that will never go off unless you aim and pull the trigger, so you can shoot your foot, but no sane person will. It is a good sniper rifle. The Rust gun can go off at any time, even when you don't expect it, but it is designed in such a way that it will never happen when it is pointed at your foot, even if you aim it there. It is a good machine gun.
Re: Open-source Zig book
#297I submitted this and unfortunately it is likely AI generated. The authors github history suggests it at the very least, along with seemingly misunderstanding a reference to a Zig language feature (labeled blocks - https://zig.guide/language-basics/labelled-blocks/ ) in the project issues ( https://github.com/zigbook/zigbook/issues/4 ). I’m not sure how much value is to be had here, and it’s unfortunate the author was…
> The Zigbook intentionally contains no AI-generated content—it is hand-written, carefully curated, and continuously updated to reflect the latest language features and best practices.
The author could of course be lying. But why would you use AI and then very explicitly call out that you’re not using AI?
Re: Open-source Zig book
#298> Learning Zig is not just about adding a language to your resume. It is about fundamentally changing how you think about software. I'm not sure what they expect, but to me Zig looks very much like C with a modern standard lib and slightly different syntax. This isn't groundbreaking, not a thought paradigm which should be that novel to most system engineers like for example OCaml could be. Stuff like this alienates p…
Re: Open-source Zig book
#299Earlier quoted context omitted.
To call Rust syntax beautiful is a stretch. It seems that way in the beginning but then quickly devolves into a monstrosity when you start doing more complex things. Zig on the other specifically addresses syntax shortcomings in part of C. And it does it well. That claim of rust making C more safe because it’s more readable applies to Zig more than it does to Rust. I feel like the reason the rust zealots lobby like c…
> To call Rust syntax beautiful is a stretch. I don’t see where the comment you’re replying to does that (was it edited?). Their comment says nothing about aesthetics.
> Rust is the small, beautiful language hiding inside of Modern C++
Re: Open-source Zig book
#300Earlier quoted context omitted.
For those who actually want to learn languages which are "fundamentally changing how you think about software", I'd recommend the Lisp family and APL family.
I'd also throw Erlang/Elixir out there. And I really wished Elm wasn't such a trainwreck of a project...