News for hackers. Stuff that matters.
Re:Was Rust Worth It? by anon-3988 on Thursday October 26, 2023 @12:31AM (#38021614)
I am curious what kind of code you are writing? Is it very low level or very high?

>I know rust gives memory safety and how important that is, but the ergonomic is really bad. Every time I write some rust I feel limited. I always have to search libraries and how to do things. I cannot just "type the code".

You don't have to search libraries and figure out how to do things in Zig?

Re:Was Rust Worth It? by dharmab on Thursday October 26, 2023 @01:30AM (#38021958)
It's hard to describe, but in some languages, you spend a lot less time looking at reference docs and more time just naturally writing the solution. Lisp is a great example of that, if you get through the learning curve.
Re:Was Rust Worth It? by Buttons840 on Thursday October 26, 2023 @08:04AM (#38024435)
I've been spending a lot of time looking through the WebGPU API as implemented by Rust's WGPU library. WGPU has C bindings as well. If I were to write my WGPU code in Zig, what does Zig offer to help me avoid looking at the WGPU docs and WebGPU spec?

I suspect Zig libraries feel easier because they're doing easier things. I bet if you try to draw a triangle with the Vulkan API in Zig, you'll find yourself looking at the reference docs a lot.

Re:Was Rust Worth It? by kuon on Thursday October 26, 2023 @06:40AM (#38023871)
Most of the time I can use my "general computer science baggage" to write the solution. At present, I do embedded and web business logic (wasm) where the UI is rendered by preact. For those two projects zig is working very well.