geoffreybennett/alsa-scarlett-gui

Question: Why C and not Zig/Rust

Closed this issue · 2 comments

I think I know C good enough to tell that experience working with it is frustrating at best. It make sense to use when you have existing code base or when using specific toolchains/compilers. But for general-purpose system programming, why not using C ABI-compatible more modern languages like Zig or Rust? Zig particularly could be learned by few days due to it's primitivity. Though, Rust is very complex, closer to C++, I can admit.
It's just a question.

You have some good points, but I've never heard of Zig and I don't know Rust at all. I struggled enough learning Gtk4 and the ALSA C API sufficiently to write this, let alone trying to learn another language at the same time. So why C/Gtk4? Because if it wasn't that then it'd either be Perl/Gtk or this app wouldn't exist 😄

It'd be lovely to see this app written in a better language. I can only wish good luck to anyone attempting that.

@geoffreybennett Thanks for the answers! I actually did try and it want surprisingly well with Zig. Though I just implemented the first GTK form of the app. Zig can import C files as is, maybe I can take some shortcuts. Thanks again for your work!