5 ms·
Yes: https://godbolt.org/z/72Dvpe https://godbolt.org/z/72Dvpe
by AndyKelley 7y ago
Yes: https://godbolt.org/z/72Dvpe https://godbolt.org/z/72Dvpe
- iruoy 7y agoSimple stuff like this looks very similar to Rust: https://godbolt.org/z/spkKai https://godbolt.org/z/spkKai Rust quickly becomes harder though, while Zig is much easier to grasp.
- tsimionescu 7y agoThe fact that they compile to the same assembly instruction does not make them similar source code.
- tzjmetron 7y agoSemantics vs syntax.
- abainbridge 7y agoThe languages are similar enough that the Zig tool-chain can translate C source into Zig source. There's mostly a one-to-one correspondence.
- tzjmetron 7y agoTo be fair, that's not really a very strong point, is it? Any language can be translated into C via an appropriate transpiler.