3 ms·
Being the anti Rust alternative for people who has spent years/decades accumulating weird knowledge about the inner workings of C and/or C++ and maintain that b
by ViewTrick1002 1y ago
Being the anti Rust alternative for people who has spent years/decades accumulating weird knowledge about the inner workings of C and/or C++ and maintain that being able to shoot your feet off at a distance when doing the wrong incantation is a critical feature to have.
I’m ranting but based the Rust/Zig discussions here on HN and the number of segfault issues in the Bun repo there is a core of truth.
https://github.com/oven-sh/bun/issues?q=Segfault https://github.com/oven-sh/bun/issues?q=Segfault
- latchkey 1y agoTo be fair, nodejs has 36 open, 474 closed: https://github.com/nodejs/node/issues?q=Segfault https://github.com/nodejs/node/issues?q=Segfault
- ViewTrick1002 1y agoWhich is written in C/C++. Showing that Zig is not moving the needle on UB when a project becomes sufficiently complex. Take a look at Deno and check the percentage coming from FFI with unsafe languages. https://github.com/denoland/deno/issues?q=Segfault https://github.com/denoland/deno/issues?q=Segfault
- Jweb_Guru 1y agoPeople keep thinking that even though Microsoft, Apple, Google, etc. with all the incentive and tooling in the world couldn't evade one of the few replicable results in programming languages (people can't reliably write memory safe code in memory unsafe languages), somehow with Zig it will be different. It's honestly a pretty fascinating phenomenon to me because most of these people are smart, and some of them are even ostensibly in the security community.
- lyu07282 1y agoWe have language groupies now, like how teenagers have their favourite k-pop bands, I wouldn't take it all so seriously. Security has a tendency of making itself undeniable, it's lessons will be learned one way or another by everybody without exception.
- jasmes 1y agoAESPA
- surajrmal 1y agoIt's not that they think zig will avoid the issues, but rather that the cost required to do so is too great, so they would rather have a nicer language with more traditional ways to catch those bugs. If things like memory tagging continue to take off, hardware will catch these issues anyways. I don't personally agree but they are allowed to have their opinions. More than memory safety, I do think thread safety is a bigger challenge I'd love more modern languages to tackle.
- Jweb_Guru 1y agoPeople are allowed to have whatever opinions they want, sure. I've seen numerous advocates of Zig defend the idea that "in practice" it is about as memory safe as Rust, something that's clearly not true. That's the part I find weird, not that people enjoy using unsafe languages.
- jeremyjh 1y agoThe question that matters is how many deno has.
- justinhj 1y agoThere is plenty of room for both languages to exist. Engineering is all about trade offs. Rust has some big pluses but it's not suitable for every application.
- pron 1y agoOr Rust being the anti Zig alternative for people who have spent years/decades accumulating weird knowledge about the finer details of type systems and maintain that not being able to express an algorithm, or review one, without consulting a language lawyer (or becoming one) is a critical feature to have and that build times don't matter. The point is that all languages, including those two, make very clear and sometimes significant tradeoffs that may be more or less appropriate in different circumstances or for different people, and, at least so far, no consensus about the "right" tradeoff has emerged.
- ioasuncvinvaer 1y agoHow is Rust anti zig if it came first?
- littlestymaar 1y agoRon Presler (the person you're responding to) is pathologically anti-Rust since before the birth of Zig.
- pron 1y agoOh, I'm very pro Rust. I think that its use of the borrow checker is inspired and quite spectacular, that we can learn a lot from it. I just don't like it (as a practical programming language). It's not for me and for people who have similar preferences. I am, however, very much anti claims made by some Rust fans that take an empirical and universal nature and are simply not known to be true (e.g. it is true that the more memory safety guarantees the fewer the vulnerabilities - all else being equal - but it is quite simply logically incorrect to conclude from that that the best way to minimise vulnerabilities is to have more sound safety guarantees). I think Rust is a fantastic fit for some people who want to do low-level programming, and a pretty bad fit for others (like me). Same goes for Zig or, really, almost any language. Obviously, neither one is inherently or universally superior to the other. BTW, my enthusiasm for Zig is not because I like all of its design decisions, but mostly because it's so different from most other languages and, in some cases, its decisions run contrary to my personal inclination (e.g. with regards to encapsulation) that I'm fascinated to know how it works out. Rust, on the other hand, is less interesting for me to think about, because aside from the more intensive typechecking (that I'm already familiar with from other languages) the overall experience it offers is quite similar to C++. Maybe I won't like what Zig ends up becoming, but for someone who's seen so many languages, it's really interesting to come across something so fresh.