News for hackers. Stuff that matters.
Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by ajnin on Tuesday July 30, 2024 @10:22AM (#41109490)
> remove libclang

So `zig cc` will have to go as well ? I was under the impression Zig as a drop-in C (cross-)compiler was one of its main selling points.

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by flohofwoe on Tuesday July 30, 2024 @10:39AM (#41109624)
See: https://github.com/ziglang/zig/issues/16270#issuecomment-161...

The ability to seamlessly compile C/C++/ObjC code within a Zig project is extremely important for me as well, but I'm fine with that job being delegated to a Zig package and the Zig build system.

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by ajnin on Wednesday July 31, 2024 @05:02AM (#41117490)
I read that commment as well but if you need to use the Zig build system it means you won't be able to integrate Zig into an existing project as easily, you'll have to integrate the Zig build system or even to integrate your project into the Zig build system, and that's an another level of complexity entirely.
Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by mst on Wednesday July 31, 2024 @07:58AM (#41118410)
There are enough people who care about adding zig to existing projects being easy (including the zig BDFL) that I would hope that this approach won't be stabilised until they're confident that it isn't adding enough extra complexity to spoil the experience.

I mean, we'll have to wait and see, and there may be a transition period during which things kinda suck, but zig has a pretty good track record here so I'm more optimistic than I would be in most cases.

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by pta2002 on Wednesday July 31, 2024 @04:36AM (#41117379)
I think for better or for worse it makes sense that this is delegated to a separate package. For me it always seemed like a weird tangential thing that Zig did that is not really related to Zig The Language, and more to Zig The Build System. It made more sense when they were depending on LLVM either way, but now that they're closer to getting rid of it, it does not make sense to keep the dependency just for something that always seemed more like a 'neat thing' than a core language feature.