5 ms·
I think that's correct with some overlap, yes. Zig's explicit goal - as stated by the creator - is to replace C. Nothing more, nothing less. I feel like Rust w
by nrclark 5y ago
I think that's correct with some overlap, yes. Zig's explicit goal - as stated by the creator - is to replace C. Nothing more, nothing less.
I feel like Rust wants to replace C but it also wants to replace C++. And given the complexity difference between the two languages, that means that Rust will end up closer to C++ than to C.
So there's some overlap based on how Rust positions itself, but not based on how Zig positions itself.
- masklinn 5y ago> I feel like Rust wants to replace C but it also wants to replace C++. Rust wants to make systems programming memory safe (and type safe while at it). It's not really about any specific language, it's about dragging the field forwards on the safety front. Well it's not really Rust, it's the Rust community, which kinda wrestled it away from Graydon Hoare: the original inception of Rust was more of an applications language (what with the evented model and the split stack and the planned-though-never-really-implemented GC'd pointers) — which explains part of the historical confusion with / comparison to Go. But then a critical mass of people took a look at this early rust and figured "we've got plenty of memory-safe and type-safe (ish) languages for applications, but this thing has precise control over memory and lifetimes and shit, we could actually build reliable infrastructure with that", and it coincided with a lot of memory safety issues news (which has been continuing ever since), and the rest is history, pretty much.
- jhoechtl 5y ago> Zig's explicit goal - as stated by the creator - is to replace C. Nothing more, nothing less. The ZIG compiler requires a C compiler to compile to a native executable though.
- Twisol 5y agoTo be fair, the C compiler also requires a C compiler. Bootstrapping is a common milestone in language development (Rust can bootstrap itself too), so while the current state of affairs for Zig might require a C compiler, that's not necessarily written in stone.
- wyldfire 5y ago> The ZIG compiler requires a C compiler to compile to a native executable though. Do you mean compiling the zig compiler or zig programs? I think neither is quite the case. zig itself can build both Zig programs and C/C++ ones. Zig doesn't need to use a C compiler to build native Zig executables. It does need a linker, as does Rust, as do C/C++ programs and AFAIK zld is not yet ready. However it's accurate to say that it's only able to compile the C/C++ code by leveraging libclang, the C/C++ compiler underneath.
- AndyKelley 5y agoHere's the info on zld status: https://ziglang.org/download/0.8.0/release-notes.html#Self-Hosted-Linker https://ziglang.org/download/0.8.0/release-notes.html#Self-H... By the way, check out this project by Zig core team member, Vexu: https://github.com/Vexu/arocc https://github.com/Vexu/arocc
- messe 5y ago> The ZIG compiler requires a C compiler to compile to a native executable though. No it doesn't? Not unless you want to also compile C, which the Zig compiler is capable of doing because it bundles clang.
- abledon 5y agoWe already have c/c++ as low level bases, now zig/rust are coming for the throne, I really hope contenders dont keep spawning like rabbits. If everyone got behind a smaller # of initiatives the worlds codebase would be simpler going forward? I'm imaging some poor software engineer in 2065, having to maintain an enterprise legacy stack... levels of FORTRAN/COBOL->C->C++->ZIG->RUST->PERL->PYTHON.... all the way up....JS..etc..
- kaibee 5y ago> I'm imaging some poor software engineer in 2065, having to maintain an enterprise legacy stack... levels of FORTRAN/COBOL->C->C++->ZIG->RUST->PERL->PYTHON.... all the way up....JS..etc.. I have good news and bad news: That programmer will not know any of those languages, as they will just program in English and GPT-3000 will convert it into code.
- PaulDavisThe1st 5y agoThe reason that we have programming languages at all is that English and all other natural languages are too ambiguous to be used for this purpose. GPT-3000 will have no problem understanding some interpretation of your English (or Spanish or Mandarin) "program", but will it be the right one? How long will it take to get GPT-3000 to understand what you mean when you can only talk to it in English (or Spanish or Mandarin) ?
- AnIdiotOnTheNet 5y agoEventually maybe only the same amount of time it takes the average programmer to understand your meaning.
- chubot 5y agoSo like months and years? On every project I’ve worked on, the programmers conception of the requirements evolves until the minute they stop working on it. And they only understand the part they worked on, not the whole thing
- AndyKelley 5y agoYou can find Zig's explicit goal as stated by the creator on the homepage: > Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.