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

> I'm not sure I like the "better C" label.

I agree that Zig is more than a "better C", and I edited my comment.

Regarding `comptime`: I haven't fully grokked it, but it looks very similar to the capabilities of D (and in part Nim). Do you by chance know those languages and can give a comparison?

(Languages like Idris also allow to express a lot at compile time, but that's quite a different domain)



Nim and D have a similar feature, but Zig's radical design is not in including this feature but in not including others it can replace (generics and macros). Both D and Nim have generics as a separate features, and Nim has macros and D has conditional compilation as a separate features. Zig is not special in having comptime; it's special in having only comptime as the single partial-evaluation mechanism.


Are you sure that minimalism is a design principle of Zig's, and not just the current state of the project? @andrewrk's comments at https://github.com/ziglang/zig/issues/130 lead me to believe that it's still undecided.

(To be clear, I don't use Zig, yet.)


Yes, I am sure it's a design principle. Which is not to say that some aspects will change. E.g. I'm in favour of some of the (more minimal) suggestions here: https://github.com/ziglang/zig/issues/1669




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

Search: