Zig General

Come home [any race] man edition
Why aren't you using "C, but with the problems" fixed for your personal projects yet?

What are (you) using zig for?
What are your hopes for zig?
What do you like / dislike?
Share your projects / experiences, ask questions, out yourself as a S O Y by telling us how shit the language is.

>Docs (0.9.0)
Lang ref: ziglang.org/documentation/0.9.0/
Stdlib docs: [YOUR_ZIG_DIR]/lib/std/
Build system: zig.news/xq/zig-build-explained-part-1-59lf

>Learning / practice / other stuff
Interfacing with c library: pastebin.com/2R1LBYyM
github.com/ratfactor/ziglings
adventofcode.com
ziglearn.org/
youtube.com/c/ZigSHOWTIME

Attached: zig.png (153x153, 4.27K)

Other urls found in this thread:

ziglang.org/learn/overview/
twitter.com/NSFWRedditGif

Attached: 67255413_2314728155291421_771093255520518144_n.jpg (2002x1477, 363.96K)

>"C, but with the problems" fixed
what problems?
in my mind its the programmer who creates them. not exactly a grybeard tho.
convince me, op.
what is superior about zig?

>defer
>very little UB
>Comptime is default, so no preprocessor needed
>Faster
>Defer
>Error handling
>Defer
>Errdefer
>Sitaxe is simple and powerful
>Uses C libraries better than C because it has namespaces
>Compiles C and C++, so you can just add those with your zig project anyway (great for porting shit)
>Infinitely better ABI control
>Stack traces on debug mode
>All std functions which allocate data ask you for an allocator
>Namespaces
>Best generics programming that exists at the moment
>Inline is not a suggestion, it's a command
>Symbols aren't exported between translation units by default
And I'm sure there are others.

ziglang.org/learn/overview/

huh.
will have a look at it.
but it needs to be actually faster.
bc im perfectly happy with C for now. (yeah im a neanderthal. sue me.)

I was too. For 10+ years I've looked for a C replacement, and now I found it. I'm happy to say C has finally become my second favourite language.

You have no idea how passionate I am about zig. No other language even comes close, and I was frakly losing hope on an actually good and simple language without any garbage collection or underlying runtime env bullshit to come out. And to think I almost got filtered by the stdlib documentation...

I should probably add that to the OP next time, thanks.

well, guess what. Zig is a C compiler too

>good and simple language without any garbage collection or underlying runtime env bullshit

kek. i think in the exact same criteria.
was interested in rust but it is another victim of paradigm standing in the way of coding.

and
>Zig is a C compiler too

is a big boon.
i can reuse my codebase by just slapping it onto a zig project.
didnt see zig supports branchless.
or pointers to functions.
no problem: if it doesnt, i can use C for that part.

sounds promising.
ill give it a honest chance.
thanks, lads

Sick, the 3rd Zig thread in a row!

Bois, i have high hopes that Zig gonna actually get industry wide used upon 1.0 release.

Finally, coding will be fun again.

Attached: 1587164287328.jpg (1200x616, 120.39K)

>Type system
>No overloading syntax
>defer
>No hidden allocations
>Easy multithreading (comparable easy)
>Builtins

Are strings easier to deal with in Zig? It's so fucking painful in C man. I can program in C fine but the thought of dealing with C strings really puts me off every time.

Zig is neat but the camelCase shit in the core language is off-putting. I can't. Sorry. Call me petty, call me retarded, looking at camel case is like looking at a 5 year old's scribbled drawings. You have to pay me to use camelCase.
I wish Zig had nim's style ambiguity feature.

XD
You worry about that?

Zig has a pointer-and-length "string" type that's used pretty much everywhere in the standard library, as well as zero-terminated type for APIs that require it. Static strings have both a length and are zero-terminated, so they are useable for all APIs.

The standard library has a decent collection of string manipulation functions too, certainly better than C.

It doesn't have a string type, if that's what you're asking. I never really minded C string manip, but I can say that slices help, just because you don't have to worry about overflows.

> Come home [any race] man edition
I'm a woman, clearly zig is not the language for me

>I'm a woman, clearly zig is not the language for me
This is correct.

ewww
girls are yucky

ZIGGERS

Thanks, but I stick with C.

Ziggers and "poggers" pilled.

You'll never be a real woman.

the reason why "she" cant prove anything is because "she" would be banned for posting gore on a blue board