How Zig Helped Us | Prime Reacts

preview_player
Показать описание
Recorded live on twitch, GET IN

MY MAIN YT CHANNEL: Has well edited engineering videos

Discord

Рекомендации по теме
Комментарии
Автор

Zig can add a lot of stuff to the standard library without being bloat, because of the compilers lazy evaluation. I wish other languages did that. Every time c++ adds more things to the standard library it becomes slower to compile (and the c++ shared library size increases).

notuxnobux
Автор

I totally concur with my experiences in Zig! I love Zig and I will definitely use it where I still use C, because Rust is definitely not a C replacement. It's more a C++ replacement. But I also found, like Andrew warns people, Zig is not yet stable and should not be used in production, things are moving a lot. But it will get there for sure, and then you have a lean, clean fast language that really does the low-level systems stuff better (and in smaller binaries) than Rust can. Rust is great for the higher level apps, what we currently use and/or used C++ for.

CallousCoder
Автор

Nice to see prime checking in on zig. They just had 0.11 release with a lot of work done. Can't wait for 1.0

Surf_Cat
Автор

Totally agree with this blog post.

C is awful to use, but not for the reasons many developers think. Zig team recognized the good and the bad of C and made a modern language that embraces C’s advantages and fixes its glaring issues.

People think “low level” means “hard to write” or “arcane”, but it doesn’t have to be that way. “Low level” is about control, not boilerplate, verbosity, difficulty, or being error-prone.

davidandrewthomas
Автор

Zig needs a good linter. With lints, it's almost trivial to spot the "woops I forgot to deinit stuff"

venir_dev
Автор

It's nice that zig can compile C code. It works with lto and stuff like that so I have a project written in zig and it includes C code and the C code is around 200 000 lines. Most of that C code gets removed by zig as it's not used from the zig code. This works the other way around as well (using zig from C). So the final (static) binary size is just a few kb.

notuxnobux
Автор

The testing allocator can actually catch leaks, so you can ensure your code isn't leaky. The GPA also has the option for checking it, but I prefer to rely on tests for it.

a.r.t.u.r.o.
Автор

The only reason I don't code in zig, is because I don't want to be called a zigger😢.

corejake
Автор

Maybe they could add a keyword like "temporary" to tell when a variable will be deleted when off-scope. Or the opposite, "persistent" for when a variable will stay until you explicitly delete it. But the latter would imply changing some fundamental things about the language while the former is just adding a new feature, so I think it's easier going with the former.

batatanna
Автор

I've been pretty interested in zig. This was very helpful article.

garanceadrosehn
Автор

Zig looks promising but I’ll try in a year or so when tooling will be better

adrian_franczak
Автор

It's like in D with dstep, importC or betterC. Except that dlang has been around for too long to be new and shine.

carstenrasmussen
Автор

Who says the enthusiasts die? What these guys do is awesome!!!

daltonyon
Автор

Yes!!! Finally I managed to catch a glimpse of why Tom’s a genius!!!! He truly is!!!

pif
Автор

I dont know where he hosts his data -
12.5GB is more like 0.05$ on a root server SSD
while his blog states 12.5 GB = 2.5$
25% markup
did he wanted to make it sound more drastic?

systemI
Автор

Ive just had to write a personal statement for a scholarship, and I normally hate writing, but I think me watching all these article reading videos have improved my skills substencially. Thanks Prime!

marble
Автор

When you watch a video, there is lore, you understand the lore, you are a genius like tom

NeoShameMan
Автор

The policy of being explicit isn't actually bad; there's a reason why people hate “and then it's magically taken care of”. It's confusing at times. The destruction wouldn't be so bad if the compiler wouldn't allow you to forget it.
Ideally, the compiler sees the "defer" and it's good, or you want to do something special, then you need something else to tell the compiler that you've thought about the destruction and defer isn't what suits your needs (and then you do whatever you want).
As a C++ programmer, I'm used to destructiors running implicitly, but if the language forced me to write them out explicitly, that would be okay, I guess (assuming they're non-trivial – don't bother me with the destruction of every int).
Initialization is the same game. Making it hard to do memory acquisition without initialization is smart because usually, you want your stuff initialized.

Bolpat
Автор

Did some toying around with zig on the weekend and I really like it. Feel like the go of low level language. No overly complex syntax or crazy rust macros (tho it can KINDA do macros with comptime and inline). Only thing that tripped me up was the language server was super unhelpful. Wouldn't show me obvious compile time errors like not passing a tuple to debug.printf. Or simple sanity checking like telling me I'm storing or passing back a dangling pointer

duke
Автор

I really liket the thumbnail art, whoever did it deserves a raise

baguettedad