Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> But aside from Jai, is anyone C alternative really looking to pursue having killer features? And if it doesn't have one, how does it prove the switch from C is worth it? It can't.

Zig's `zig cc` is a killer feature that doesn't even require using Zig-the-language at all. `zig cc` is an LLVM-based C compiler that gives you trivial cross-compilation for existing C codebases, adds effective caching, and can be easily installed on most operating systems with `tar -xzf`.

https://andrewkelley.me/post/zig-cc-powerful-drop-in-replace...



zig cc has enough bugs in it that I just went back to using clang on each platform.


What you're seeing is most likely not bugs (it is clang after all), but the result of the much stricter default compilation settings in "zig cc" which tends to break a lot of C code that hasn't been checked against a static analyzer or ASAN before.


No, they were bugs in zig CC. They were things like linking against the wrong frameworks on macOS.


Ah alright, some of those macOS specific problems had been fixed a little while ago when work on the macOS parts of the zld linker happened. I still get an occasional "framework headers not found" on macOS in the current Zig head version, but after the first failure I never seem to be able to reproduce it. It also never happens when running in CI, so I'm not sure if it isn't actually a problem with my Xcode setup.


Possibly true, but bugs can be fixed. The potential is still there.


If you want to compete with Rust on cross compilation usability, you will have to do better than that.


    pip install ziglang
    python -m ziglang




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: