MIDREAL
Menu

Ask HN: Rust, Zig, or C?

10 points | 2d ago | Discuss on Hacker News | Back to Radar

Comments

HankTan 2d ago on HN
Zig idk lol , C’s pretty obvious
selectedambient (author) 31h ago on HN
ikr, i like to try things out though.
erdaniels 2d ago on HN
C
Borg3 2d ago on HN
C to the core! :) Why? Because im more into retro computing these days. C gives me excelent coverage pretty much everywhere.
soyayaos 2d ago on HN
zig
selectedambient (author) 31h ago on HN
finally, zig users enter the thread. i come from/currently use c, but i do enjoy zig. rust, not so much but i like to think i at least know my way around the rust language.
hizlikovboy27 2d ago on HN
C ofcourse :). its incredibly portable and gives you full control over thats happening under the hood. I dont know enough Rust and Zig but C has stood the test of time for a reason.
netnchen 2d ago on HN
I'm trying rust for now; start from C/C++ then switched for Java for many years; and looks people are talking with Rust so I want to give it a try ;)

To be frank, does it matter in the AI vibe coding era? so long you can understand the program, although in a unfamiliar language, but you can read and write in C!!

selectedambient (author) 31h ago on HN
i would argue it might matter more, as languages use cases might be exploitable further, or new ones made more obvious.
daveads5 2d ago on HN
Every programming language has its use case.

It’s something I still believe, even now, in the age of AI.

selectedambient (author) 31h ago on HN
oh absolutely without a doubt, possibly even more so with llms
spacedcowboy 47h ago on HN
I didn’t really like any of them, so I wrote my own :)

I wanted the compiler to automatically parallelise and vectorise my code, because CPUs these days are inherently multicore, and not using the GPGPU seems like a huge waste of resources, so: xc[1]

Structured closely to “C with classes”, but has blocks/callbacks as fundamental types and implements ARC to make memory management pretty trivial. Allows 3rd-party libraries without header files by reading the DWARF content of the library, does the auto-detection of data-parallel code etc etc. Docs at the link.

1: https://compile-xc.org/

soon_to_be_sb 46h ago on HN
C forever.
mikewarot 46h ago on HN
Pascal for me. The case sensitivity and inscruitible variable and type syntax of C/C++ don't match the way I think. Then there's all the macros and .h files.
sph 45h ago on HN
Odin.
Cheese48923846 45h ago on HN
C for circular references.
Rochus 43h ago on HN
Depends on the use-case. Instead of C I now mostly use Micron.
charliercrvta 41h ago on HN
Rust, i like my compiler catching mistakes before they exist
devilsdata 37h ago on HN
Rust

And my favourite flavour of ice cream is vanilla.

mirmor23 37h ago on HN
I do not understand the value proposition of Zig.

Very good build tooling was huge plus, but now with llm this is not a differentiator anymore.

With strict c compiler flags, and other sanitizer tools many of the niceties of zig can be solved - maybe not all.

Two big items -- RAII, and memory safety -- neither Zig, not C solves them. Rust does.

So, I would choose C or Rust based on the needs.

Also, if someone here have a compelling reason as to when/why Zig is useful in professional grade projects, where the language has to scale to large codebases, I would like to hear it.

bjourne 28h ago on HN
yes
adriant93 26h ago on HN
Rust pretty much here.
wojciii 26h ago on HN
Also here.

But also C and Python. :)

I love how easy it's to write system level tests in Python.

solyin 26h ago on HN
Swift.
constantinum 21h ago on HN
Haskell
XanderZhan 47m ago on HN
Undoubtedly, Rust

Comments are loaded live from Hacker News and are not stored by Mid or Real.