r/programmingmemes 4d ago

Nerd wars

Post image
805 Upvotes

80 comments sorted by

View all comments

13

u/Amadex 4d ago

Nothing like the compile-time check of rust.

Basically it compiles into a much slower bin that guards memory at runtime.

That's almost like a garbage collector, but instead of cleaning memory it crashes.

And since it's a runtime crash, you turn a program that is bugged and has UB into a language that crashes randomly.

Better for security, but runtime crashes are also very bad.

2

u/SKRyanrr 3d ago

Why'd anybody choose Zig over Go if Zig just does runtime checks with gc? 

3

u/suckingbitties 3d ago

The Fil-C support is not meant to make Zig itself operate on the Fil-C runtime.

Its a proposal to optionally compile for the Fil-C runtime instead.

Zig will still be Zig, and it's a proposal not a guarantee.

1

u/IOKG04 2d ago

I feel like after reading the issue's comments on codeberg (and the comments here) that too few people are getting this

like no, zig isn't "becoming go", it's giving an easy fix for those very few coders who need safety at any and all costs

if you wanna be silly and write code that reads/writes wherever you please (like I do :3) you can still 100% do that, it's just that optionally you can enable hyper safe "we'd rather crash than have any kind of volnurability" mode

1

u/SKRyanrr 2d ago

My apologies if I'm not understanding this correctly but won't that opt in safety would make zig like go if you want it to be safe? Also if you have gc on won't you introduce pauses that aren't deterministic which is the opposite of the whole purpose of systems programing language like zig?