6 ms·
> 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 i
by jitl 4y ago
> 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-replacement-gcc-clang.html https://andrewkelley.me/post/zig-cc-powerful-drop-in-replace...
- sitkack 4y agopip install ziglang python -m ziglang
- david2ndaccount 4y agozig cc has enough bugs in it that I just went back to using clang on each platform.
- dralley 4y agoPossibly true, but bugs can be fixed. The potential is still there.
- flohofwoe 4y agoWhat 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.
- david2ndaccount 4y agoNo, they were bugs in zig CC. They were things like linking against the wrong frameworks on macOS.
- flohofwoe 4y agoAh 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.
- marcosdumay 4y agoIf you want to compete with Rust on cross compilation usability, you will have to do better than that.