Re:Zig cc: A drop-in replacement for GCC/Clang
by AndyKelley on Tuesday March 24, 2020 @06:17PM
(#22679690)
Yes: https://godbolt.org/z/72Dvpe
[ Parent
| on HN ]
Re:Zig cc: A drop-in replacement for GCC/Clang
by iruoy on Tuesday March 24, 2020 @07:06PM
(#22680021)
Simple stuff like this looks very similar to Rust: https://godbolt.org/z/spkKai
Rust quickly becomes harder though, while Zig is much easier to grasp.
Re:Zig cc: A drop-in replacement for GCC/Clang
by tsimionescu on Tuesday March 24, 2020 @07:21PM
(#22680129)
The fact that they compile to the same assembly instruction does not make them similar source code.
Re:Zig cc: A drop-in replacement for GCC/Clang
by abainbridge on Wednesday March 25, 2020 @09:18AM
(#22684216)
The languages are similar enough that the Zig tool-chain can translate C source into Zig source. There's mostly a one-to-one correspondence.