News for hackers. Stuff that matters.
Re:Some Thoughts on Zig by thehaxerdude on Thursday July 21, 2022 @11:48PM (#32188300)
Rust is a terribly complex language, there are people at FAANG companies threatening to fork the language when attempts to simplify it are proposed. The amount of half-baked features present in the language are footguns in their own right.

I love Rust, but I think Zig solves 70% of the memory safety problem at the benefit of a much simpler language.

Re:Some Thoughts on Zig by pcwalton on Thursday July 21, 2022 @11:51PM (#32188312)
> Rust is a terribly complex language, there are people at FAANG companies threatening to fork the language when attempts to simplify it are proposed.

Ironically, the person I think you're referring to is actually me, and that's a strong mischaracterization of what happened. Nobody was ever "threatening to fork the language". Besides, that's irrelevant to this discussion, because none of the complexity of Rust compromises memory safety.

> I love Rust, but I think Zig solves 70% of the memory safety problem at the benefit of a much simpler language.

I don't believe the 70% number without evidence. Again, the problem that we really need to solve is complex UAF caused by unexpected interactions between components of large software systems, and I see nothing in Zig to solve that.

Re:Some Thoughts on Zig by kaba0 on Friday July 22, 2022 @02:59AM (#32189315)
The problem is that solving 70% of memory safety is arguably the same as solving 0% of it.
Re:Some Thoughts on Zig by flohofwoe on Friday July 22, 2022 @03:33AM (#32189505)
So basically, using Rust is also entirely pointless as soon as it needs to call into non-Rust code (like operating system shared libraries)? ;)

On a more serious note: IME most memory corruption issues in C and C++ are 'side effects' of the sloppiness of those languages (like not catching overflow, missing range checks, problems arising from implicit type conversions, sometimes just not compiling with warnings enabled, etc...).

Zig enforces much more correctness (to a point where it is sometimes annoying to a C coder, but one quickly gets used to it), and it even does this when building C/C++ code (just by using much more 'picky' default compilation options than C/C++ compilers).

Re:Some Thoughts on Zig by Tozen on Friday July 22, 2022 @12:44PM (#32194090)
But, is Zig really all that much simpler a language, from the viewpoint of a C alternative? And is that simplicity partially due to lack of features and youth, so that the complexity can be expected to pile on later. We are talking about a language that hasn't hit 1.0 yet, nor is not due to for some years to come.
Re:Some Thoughts on Zig by dralley on Friday July 22, 2022 @09:15PM (#32199212)
Andrew Kelley has been pretty explicit that he's going to hold a hard line on not adding a surplus of features to the language.