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.
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.
>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?