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

The authors section on comptime makes me believe they have not used zig anything non trivial.

I don’t think comptime as just some macro system. It is closer to a reflection system. I use comptime to access types. You can create specialized paths depending on type.

Also imo generics are “first class” in zig. Comptime is first class and thus generics are too.





> X is first class and thus Y [implemented in terms of X] is too.

Is everything first class, then?


I would argue C preprocessor macros are not first class. They are optional.

This anything implements with macros are not first class


In theory it can encode 0 and 1 so anything really, right?



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

Search: