←back to thread

Zig is hard but worth it

(ratfactor.com)
401 points signa11 | 1 comments | | HN request time: 0s | source
Show context
ldelossa ◴[] No.36150624[source]
I'm surprised that the reason I'm mostly interested in Zig is not mentioned.

This is C interop.

I work with C quite a bit and I enjoy it, however writing a large project in C can be tiresome.

Having an option like Zig which can import C headers and call C functions without bindings is pretty attractive, especially when you want to write something a big larger but still stay in C world.

replies(6): >>36151152 #>>36151354 #>>36151700 #>>36153013 #>>36153780 #>>36158610 #
Fiahil ◴[] No.36151700[source]
C interop is not as much a "killer feature" as it used to be. When you deal with data science, web and other similar domains, reading and writing JSON ergonomically is much more important than being able to call a C function directly. It's just a nice-to-have.
replies(1): >>36152631 #
1. afdbcreid ◴[] No.36152631[source]
Yeah, but when you're doing systems programming (which Zig aims at if I understand correctly), easy interop with C is much more important than easy JSON marshalling.