News for hackers. Stuff that matters.
Re:Was Rust Worth It? by csomar on Thursday October 26, 2023 @02:08AM (#38022229)
Wait, I am a bit confused. Does Zig have more/better libraries than Rust? I thought it's a pretty new language. The most limiting thing for me with Rust was the lack of libraries (vs. say Python or Node/JavaScript).
Re:Was Rust Worth It? by Quekid5 on Thursday October 26, 2023 @02:53AM (#38022534)
It interops seamlessly with C libraries.
Re:Was Rust Worth It? by csomar on Thursday October 26, 2023 @03:05AM (#38022602)
Depending on what seamlessly means, Rust can also interop with C libraries. I wrapped a bunch of them.
Re:Was Rust Worth It? by GuestHNUser on Thursday October 26, 2023 @03:38AM (#38022843)
Truly seamless because the zig compiler is also a C compiler, so the type information and calling convention works across languages at a level above any other I've encountered.
Re:Was Rust Worth It? by littlestymaar on Thursday October 26, 2023 @04:15AM (#38023070)
True, but I think that the person you're responding argued that rust/C integration is also seamless. (In the general discussion I'd say they're right as C to Rust integration isn't much of an problem and you can use C libraries relatively easily in Rust as well, but at the same time when talking about Zig I don't think it's fair to put it on the same ground).
Re:Was Rust Worth It? by Capricorn2481 on Thursday October 26, 2023 @11:45AM (#38027174)
It's also an unfinished language. I agree Zig is promising, but it's not confidence inspiring when the creator is still making videos debugging the compiler.
Re:Was Rust Worth It? by imtringued on Friday October 27, 2023 @10:11AM (#38038661)
It is impossible to do C interop without a C compiler, by the way.
Re:Was Rust Worth It? by hailruda on Thursday October 26, 2023 @03:23AM (#38022724)
Seamlessly as in @cInclude("raylib.h")
Re:Was Rust Worth It? by littlestymaar on Thursday October 26, 2023 @03:20AM (#38022699)
It doesn't. The ecosystem is very immature and even the official tooling is very unstable. It has a bunch of interesting design ideas but at this point it's more of an experimental language than a production ready one by most metrics. (And unless it finds some kind of corporate backing, this is unlikely to ever change).
Re:Was Rust Worth It? by kuon on Thursday October 26, 2023 @06:41AM (#38023881)
We shipped a few web apps backed by zig. It is absolutely in production.
Re:Was Rust Worth It? by Capricorn2481 on Thursday October 26, 2023 @11:41AM (#38027095)
Just because you put it in production does not mean it's production ready.