27 ms·
That position is not only new, it's also not the consensus. Zig explicitly chooses to make memory safety a non-goal of the language, with the argument that Rus
by skohan 4y ago
That position is not only new, it's also not the consensus. Zig explicitly chooses to make memory safety a non-goal of the language, with the argument that Rust-style memory safety is a costly tradeoff which is not always justified.
Assuming that my argument has "fallen apart", or that you have "dunked" seems quite absurd given that you've taken an extreme position which many serious practitioners and academics would disagree with.
- pcwalton 4y agoThe point is that Zig's choice around memory safety makes its language design principles significantly outside the consensus around what PL design should be.
- skohan 4y agoAccording to who? It's absolutely not the consensus that every programming language needs to prioritize safety. Rust is still very much an experiment in terms of systems programming. It has a tiny overall "market share" in terms of use in large production projects compared to C/C++ and it remains to be seen whether the particular set of tradeoffs chosen by the language will lead to long term sustainable success. Zig takes another approach and is also a worthy experiment.
- pcwalton 4y agoRust is serving billions of users right now. It's far past the "experiment" stage and has proven itself.
- skohan 4y agoC/C++ have been used to implement the backbone of computing for 50 years. That is a proven technology. I'm not diminishing the success of Rust. It's been proven it can be used for serious projects. It's a bit of a reach to argue it's proven to be the best choice for all system programming use-cases going forward.
- refulgentis 4y agoYou make my brain hurt. You have these extremely long circuitous set of comments that hopstoch between insisting we're talking about Rust and that it's literally impossible to do the things you do in Zig in a memory safe language. It's especially frustrating because you've received a ton of charity and time from strangers, we understand 110% what you're thinking (I wish it was true! I've had an inordinate amount of work for 18 months now because it isn't) but you can't seem to wrap your mind around the idea that there isn't some niche where Zig is perfect and unassailable or the only alternative is rust. I don't think you have much experience in multiple languages, it's actually fairly easy to get something as fast in JS _as in C_.
- skohan 4y agoWith all due respect, your comments seem to imply a certain level of immaturity and it does not seem like you really know what you are talking about. It's possible in some cases that you can implement something in JavaScript which is competitive with a systems programming language, thanks to all the incredible optimization work which has gone into JavaScript engines, but the performance ceiling of a language like JS is much much lower than that of system programming languages. For instance, if you are optimizing for memory cache performance C or Rust or Zig are going to have tools which just don't exist in JS. There's a reason that HPC - one of the computing fields where profitability literally depends on speed - is all implemented in C and C++. And not that it matters but I've got plenty of experience with languages. I've been doing software engineering professionally for over a decade, and I've shipped professional projects in probably a half dozen languages or more including C, Rust, and Javascript. I've also done my fair share of programming in the systems domain, including computer graphics and games. I've also implemented programming languages of my own. > you can't seem to wrap your mind around the idea that there isn't some niche where Zig is perfect and unassailable or the only alternative is rust. I never said Zig fits a perfect niche. I said the theory of the language is valid, and it's a worthwhile contribution to the field. Zig, like all other languages, is an experiment. It's actually quite an interesting one with different goals than a lot of the other popular languages out there, and which is very appealing for the systems programming domain. I'm arguing against the idea that Zig is "irresponsible", which is an extreme position. I keep bringing up rust because of you guys insistence that Rust is a counter-example to the idea that a new systems programming language not necessarily be memory safe. For instance this comment: > We can't ignore the fact that Rust has shown that memory safety is not incompatible with low-level semantics. Seems to imply that Rust's existence unto itself is proof that every new systems programming language must be memory safe. C is the current standards bearer for systems programming. Everyone is trying to invent a "better C". Go and Nim are trying to do it with garbage collection. Rust is trying to do it with the borrow checker. Zim is trying to do it with ruthless simplicity and explicitness. All of these are experiments, and all of them are valid. 20 years from now we'll know a lot more about what works and what doesn't from each of these experiments, but it's too early to conclude that now.