4 ms·
I'm definitely a massive fan of some of zig's ideas I like how flexible structs are, and the inclusion of structural subtyping for them. I do wish C's unnamed
by barchar 5y ago
I'm definitely a massive fan of some of zig's ideas
I like how flexible structs are, and the inclusion of structural subtyping for them. I do wish C's unnamed fields made an appearance, however.
The way type constructors work is also really great. It's just "yeah it's literally a constructor that returns a type, like the same syntax and everything"
I'm a little concerned about how long zig is willing to defer semantic analysis and possible difficulties with symbol binding in generic code (the binding rules end up being closer to C macros than C++ templates I think). But, the language doesn't have overloading, which makes the symbol binding problems much, much, much less severe.
It has a lot of the same qualities that make me like C. It can represent the data structures I want to write and the code I want the compiler to generate, it makes using it's escape hatches ergonomic, and it's obvious what's going on, especially to unfamiliar folks looking at zig code in a debugger. Also embedding a full C compiler into the zig compiler is absolutely the correct way to do FFI. C++ level compatibility with C without all the baggage (it's kinda amazing how annoying C's conversion rules are once you add overloading and templates tbh).
It really is _staggering_ how long the compiler will defer actually doing sema and generating real code though, so we'll see.