6 ms·
My big problem with Zig is that Andrew Kelley is promising a lot of features, but doesn't really deliver much. Zig still can't proper handle UTF-8 strings [1] i
by megumax 5y ago
My big problem with Zig is that Andrew Kelley is promising a lot of features, but doesn't really deliver much. Zig still can't proper handle UTF-8 strings [1] in 2022, which is kind of unfortunate, because it's a `requirement`. In a `recent` interview[2], he claims that Zig is faster than C and Rust, but he refers to extremely short benchmarking that has almost no value in the real world.
At least Rust, as blamed and loved as it is, delivered a stable compiler and people started working on the ecosystem (in the first years, most packages were working only on nightly, but at least there were crates available). The ecosystem for zig is insignificant now and a stable release would help the language.
[1] https://github.com/ziglang/zig/issues/234 https://github.com/ziglang/zig/issues/234
[2] https://about.sourcegraph.com/podcast/andrew-kelley/ https://about.sourcegraph.com/podcast/andrew-kelley/
- ralphb 5y agoRust was started in 2006. [1] Zig was started in 2015. [2] [1] https://en.wikipedia.org/wiki/Rust_(programming_language) https://en.wikipedia.org/wiki/Rust_(programming_language) [2] https://en.wikipedia.org/wiki/Zig_(programming_language) https://en.wikipedia.org/wiki/Zig_(programming_language)
- octoberfranklin 5y agoThe language called "Rust" prior to 2013 is a completely different language from what people today know as "Rust". That language had a garbage collector, mutable aliasing, and no borrow checker (the three most unique features of today's Rust), and was basically "golang with different syntax": http://smallcultfollowing.com/babysteps/blog/2012/11/18/imagine-never-hearing-the-phrase-aliasable/ http://smallcultfollowing.com/babysteps/blog/2012/11/18/imag... The whole language got rebooted shortly after the blog post above, mostly because the borrow checker made so many other things suddenly unnecessary or trivial. What we call Rust today is at most 9 years old, and any similarities to pre-2013 Rust are strictly superficial syntax. They share a name and some syntax, sort of like Java and Javascript do. Zig today at T+7 is not where Rust was in 2020 at T+7.
- jibalt 5y agoWhat matters is time from initial inception.
- delphLonepaw 5y agoI don't think a lot, I have no problems with UTF-8 strings (unless you speak in the source code, haven't tried), faster than c and rust when it can, ofc, I saw a rust program, made my own with zig, and it's fast , and I didn't even optimize that much. Compiling is faster than rust and C a lot of the times We have packages, and a good few, thing is, this is no rust big, we don't have mozilla nor to backup and work into it. I don't think is overpromise, Vlang is overpromise, zig atm, is slowly getting there, no promises on when
- kristoff_it 5y ago> My big problem with Zig is that Andrew Kelley is promising a lot of features, but doesn't really deliver much. Have you, like, seen the release notes for 0.9.0? https://ziglang.org/download/0.9.0/release-notes.html https://ziglang.org/download/0.9.0/release-notes.html > Zig still can't proper handle UTF-8 strings [1] in 2022 There's plenty of discussion on the subject in basically every HN thread about Zig: the stdlib has some utf8 and wtf validation code, ziglyph implements the full unicode spec. https://github.com/jecolon/ziglyph https://github.com/jecolon/ziglyph You might not like how it's done, but its factually incorrect to state that Zig can't handle unicode. > In a `recent` interview[2], he claims that Zig is faster than C and Rust, but he refers to extremely short benchmarking that has almost no value in the real world. From my reddit reply to this same topic: This podcast interview might not be the best showcase of the practical implications of Zig's take on safety and performance. If you want something with more meat, I highly recommend Andrew's recent talk from Handmade Seattle, where he shows the work being done on the Zig self-hosted compiler. https://media.handmade-seattle.com/practical-data-oriented-design/ https://media.handmade-seattle.com/practical-data-oriented-d... Lots of bit fiddling that can't be fully proven safe statically, but then you get a compiler capable of compiling Zig code stupidly fast, and that's even without factoring in incremental compilation with in-place binary patching, with which we're aiming for sub-millisecond rebuilds of arbitrarily large projects. > The ecosystem for zig is insignificant now and a stable release would help the language. I hope you don't mind if we don't take this advice, given the overall tone of your post.
- iainmerrick 5y agoyou get a compiler capable of compiling Zig code stupidly fast, and that's even without factoring in incremental compilation with in-place binary patching, with which we're aiming for sub-millisecond rebuilds of arbitrarily large projects That sounds great! But at the same time people in other threads here are talking about 1-3 second compilation times for Advent of Code solutions (which I presume are smallish). Can you summarise where that really fast compiler comes from, to save me searching through that talk video? Is this something that everyday users will be able to use in typical workflows?
- 5y ago
- jibalt 5y ago> My big problem with Zig is that Andrew Kelley is promising a lot of features, but doesn't really deliver much. My biggest problem with your comment is that it is completely and utterly false. >At least Rust, as blamed and loved as it is, delivered a stable compiler After MANY years and numerous complete redesigns.