Ask HN: Rust, Zig, or C?

really not a loaded question. personally i prefer to write in c or zig. what about you?

8 points | by selectedambient 9 hours ago

16 comments

  • spacedcowboy 6 hours ago
    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/

  • Borg3 8 hours ago
    C to the core! :) Why? Because im more into retro computing these days. C gives me excelent coverage pretty much everywhere.
  • Rochus 2 hours ago
    Depends on the use-case. Instead of C I now mostly use Micron.
  • mikewarot 4 hours ago
    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.
  • daveads5 7 hours ago
    Every programming language has its use case.

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

  • hizlikovboy27 7 hours ago
    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.
  • sph 3 hours ago
    Odin.
  • netnchen 7 hours ago
    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!!

  • Cheese48923846 3 hours ago
    C for circular references.
  • soon_to_be_sb 4 hours ago
    C forever.
  • erdaniels 8 hours ago
    C
  • soyayaos 7 hours ago
    zig
  • HankTan 9 hours ago
    Zig idk lol , C’s pretty obvious
  • one43sanju 2 hours ago
    [flagged]
  • one43sanju 4 hours ago
    [flagged]
  • infralog77 7 hours ago
    [flagged]