8 ms·
Honestly, I'm very excited about zig. Lean and mean, and it's written by someone who isn't sitting in an ivory tower, not caring about actual usability. It wasn
by zero_k 2y ago
Honestly, I'm very excited about zig. Lean and mean, and it's written by someone who isn't sitting in an ivory tower, not caring about actual usability. It wasn't designed by a team of PhDs (like, e.g. Haskell), while it's clearly inspired by very useful ideas in e.g. Rust, Haskell, etc. I think it'll be very exciting to write code in zig.
- ebening 2y agoSimilarly excited about Zig. While its memory safety guarantees may not be as comprehensive as Rust's, I hope we'll one day see Zig in the Linux Kernel. I suspect the old-time kernel C programmers may have an easier time with Zig than Rust.
- cies 2y agoIIRC the zig compiler compiles C. There is some work being done on making zig compile the Linux kernel (I think someone already succeeded). zig currently uses LLVM but it wants to move away from that: https://www.reddit.com/r/Zig/comments/18x1wce/is_it_true_that_zig_wants_to_move_away_from_llvm/ https://www.reddit.com/r/Zig/comments/18x1wce/is_it_true_tha... Once zig compiles Linux there are basically 3 compilers that can do so gcc, clang (llvm) and zig (less and less llvm). I expect there to be good tools to port C code to zig (much hard for C->Rust), especially with the advancements in LLMs lately. I would not be surprised if that would result in a zig-linux code base in the coming 5 years. Sure the C based kernel may be the hot bed for innovation for years to come.
- actionfromafar 2y agoQurious: will zig still compile C after it moves off LLVM?
- vulcan01 2y agoYes, but the LLVM integration will be moved to a package so you only need to include it if you want to do that.
- troad 2y agoI'm willing to cop the slack from the Zig brigade for this take, but I'll get excited for Zig again when I'm allowed to turn `zig fmt` off in e.g. vim or VS Code. It leaves me with a sour taste in my mouth when stylistic preferences are made mandatory; it is disrespectful of the coders for whom the language is a tool. It can also be a canary for deeper issues around community engagement and openness to different viewpoints (a problem for Zig, e.g. [0]). A business with code uniformity requirements is more than capable of running a linter, and for my weekend projects, I don't give one toss about anyone's stylistic preferences but my own. Either Zig is a language for grown-ups, or it isn't. And if I'm going to be forced to code a certain way, why not just use Rust and get free memory safety out of it too? [0] https://github.com/ziglang/zig/issues/16270 https://github.com/ziglang/zig/issues/16270
- hiccuphippo 2y agoYou can turn `zig fmt` off in both.
- cornstalks 2y ago> I'll get excited for Zig again when I'm allowed to turn `zig fmt` off in e.g. vim or VS Code. But you can turn it off, can't you? > deeper issues around community engagement and openness to different viewpoints (a problem for Zig, e.g. [0]). Two things: 1. People who link that issue often forget about Andrew's comments (https://github.com/ziglang/zig/issues/16270#issuecomment-1615388680 https://github.com/ziglang/zig/issues/16270#issuecomment-161..., https://github.com/ziglang/zig/issues/16270#issuecomment-1616115039 https://github.com/ziglang/zig/issues/16270#issuecomment-161..., example: "I'm not going to simultaneously shoot myself and valuable community members in the face by yanking a load-bearing feature out from underneath us, without any kind of upgrade path."). I can understand some people disagreeing but it's not that big of an issue. 2. Personally I'm happy Zig has a BDFL. Even though that #16270 issue has some controversy, it's clear Zig has a consistent direction and goal. It's not design-by-committee and doesn't get stalled for years on the tiniest of issues while the community bikesheds for eternity.
- troad 2y ago