6 ms·
Andrew is super sharp so I imagine he and the team will get there now that it's declared as a goal. But man, it seems to me (uneducated on the challenges zig f
by wyldfire 3y ago
Andrew is super sharp so I imagine he and the team will get there now that it's declared as a goal.
But man, it seems to me (uneducated on the challenges zig faces w/LLVM) that this shifts the team's capacity away from zig and towards things like binutils. When I read the headline I assumed that they were throwing out the compiler (IIRC they had mostly/totally excised it already). But for a project like zig it just seems like there's a lot to be gained from keeping it.
That said -- the prospect of rewriting a lot of the stuff that's in the LLVM project now in zig instead of c++ - that's pretty cool and ambitious. Just as ambitious as it was for Lattner to create LLVM, I suppose.
But code that's accidentally quadratic - well, that's bound to happen to zig too, if it's as popular and useful as LLVM project is.
- von_lohengramm 3y ago> now that it's declared as a goal No. It's an unaccepted proposal.
- tredre3 3y agoBy the creator and benevolent dictator of the Zig language. I think it's same to assume it's an official goal, now.
- somethingor 3y agoHere’s a list of rejected proposals made by the BDFL: https://github.com/ziglang/zig/issues?q=is%3Aissue+label%3Aproposal+author%3Aandrewrk+is%3Aclosed+-label%3Aaccepted https://github.com/ziglang/zig/issues?q=is%3Aissue+label%3Ap...
- TUSF 3y agoAnd most of those were rejected without all that much pushback, as opposed to this one where there's about 100 comments already.
- Hermitian909 3y agoI'm reminded of a recent interview with Chris Latner about the success of Swift - he credits the success to the fact that you could start with a large objective C project and begin writing Swift without rewriting anything. Part of Rust's success is off the back of a similar compatibility with C/C++. It is difficult for me to imagine Zig succeeding without a similar capability - which is to say I hope they do not follow through on this milestone.
- Ashymad 3y agoBut rust absolutely does not have any C/C++ compatibilty besides arguably very good FFI. And that's where zig shines. They have a c/c++ compiler built into the zig compiler via zig cc, that's even easier to use than clang or GCC due to having the benefits of a buildscript and baked in libcs for different architectures, making crosscompilation a breeze. In zig you _can_ actually start with a c codebase and rewrite it file by file in zig and you _can_ include c headers in your zig files verbatim. Both of these are not possible in rust. This milestone is only gonna remove the c++ (and objective c/c++) compiler for now from zig cc. So while you could argue this will ostracize people rewriting their c++ codebases in zig, I don't imagine there's actually many people like that. EDIT: I just looked at the discussion and there's actually a lot of people that use the c++ capapbilities.
- colinsane 3y ago> In zig you _can_ actually start with a c codebase and rewrite it file by file in zig and you _can_ include c headers in your zig files verbatim. Both of these are not possible in rust. well, you can: i have done this, with Rust. but yes, it’s more the type of thing that well-resourced companies do rather than solo devs, because even with Bindgen and the like Rust really wants the atomic codegen unit to be the “library”, not C’s notion of a “compilation unit”. still, C FFI compatibility is exactly why porting from C to rust incrementally is feasible while C to, say Java, is probably a bigger leap.
- flohofwoe 3y agoYou still need a separate compiler toolchain next to Rust in order to compile the C, C++ and ObjC dependencies which is a massive build system headache (especially across UNIX-oids and Windows). In Zig that all "just works" with the standard Zig install.
- masklinn 3y ago> Just as ambitious as it was for Lattner to create LLVM, I suppose. A big difference is there was an element of no choice to LLVM, at least in Apple’s takeover of the project: GCC didn’t want to allow / do what Apple wanted / needed out of it.
- whizzter 3y agobinutils is quite a bit of a jack-of-all-trades code for handling binary code formats in portable ways, a compiler doesn't need half of it (incl legacy) if you focus it more like TCC, the larger part will be code-generation across a bunch of architectures.
- jimwhite42 3y agoThere's a document that I think was an unofficial project management document from NASA, I can't find it now, but one of the items was something along the lines of 'if your space mission isn't reusing an existing launch vehicle, it will be a launch vehicle development project and everything else, including what you think is the focus of your mission, will be secondary to this'. Edit: additional bit I remembered, this statement is prefixed with something like 'you may start thinking you project will be cheaper/more efficient if you develop a launch vehicle suited to your particular mission instead of compromising on an existing one, but', then the above.