3 ms·
> ...I'm actually looking for "the next language" to come after [Rust]. It would really be a better approach to work on getting Rust to adopt the features of Z
by jmull 3y ago
> ...I'm actually looking for "the next language" to come after [Rust].
It would really be a better approach to work on getting Rust to adopt the features of Zig you're looking for. The work it goes into developing a language into a mature option is absolutely massive. Developing a full-featured language, building a (healthy) community around it, building dev mindshare/marketshare, building trust that it's sustainable, etc is a many-years effort by many talented and dedicated people. It's a huge amount of work when you could achieve the same output by adding a certain feature or two to rust.
Of course the leadership is a bit broken right now, but they may (or may not) be able to fix it.
There's also the Typescript approach. That is, extend rust with a comptime feature wrapper. Not nearly as elegant, but you don't need to work with broken rust leadership to develop it and, if it gains traction, you may then have the leverage to get it rolled in to the real thing (if you even want to at that point).
- cmrdporcupine 3y ago> It would really be a better approach to work on getting Rust to adopt the features of Zig you're looking for. I was just pondering the other day about how nice it would be to take to get the same level of quality C/C++ integration that Zig has, but in Rust. My new job has acres and acres of C++ which isn't going to go away. Linking and wrapping against C++ is one thing; build system integration is another. Zig has some serious advantages there. That and I really want allocator_api and simd to get into stable.
- Ygg2 3y agoI'm not familiar with Rust vs Zig C++ integration. What are the stumbling blocks? Lack of stable ABI in Rust?
- cmrdporcupine 3y agoI don't have much Zig experience at all, but from what I've read Zig is pretty genius because in addition to being a Zig compiler -- with its own sane build system -- the same tool also acts as a C/C++ compiler. So mixing Zig and C/C++ has a lot less friction.
- estebank 3y agoWhat are the limitations you encounter with cxx and auto-cxx?
- steveklabnik 3y agoThey're totally orthogonal from the huge win here, which is how zig cc embeds clang, includes libc headers, etc.
- Yoric 3y agoI seem to remember a Rust toolchain that actually uses Zig as its cross-compiler (I think). Would that help?