Earlier quoted context omitted.
Why is 90% enough?
What are you trading off to get from 90% to 100%? How about compile speed? Are you willing to wait an extra second to get 100%? How about 10 seconds? A minute? 10 Minutes? An hour? Rust is notoriously slow at compiling and people have been banging on it for a while. At some point, you have to accept that the language, itself, has properties that make compilation slow.
TigerBeetle and Synadia pledge $512k to the Zig Software Foundation
161–170 of 213 posts
Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation
#162Earlier quoted context omitted.
Having a well designed type system is a as addictive as sugar. Also, Rust has a bunch of annoying warts but the borrowck ain't one of them (unless you're trying to write a linked list but it's not really something that happens IRL).
The funny thing is, in a language like Zig where memory allocation is explicit, linked lists are way more popular, just like they were in C. What happens IRL depends on your environment. :)
Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation
#163Earlier quoted context omitted.
It’s also true that people overestimate how often the “weird” patterns are needed. 9 times out of 10 it’s the programmer who is missing something, not the borrow checker.
That has not been my experience with it, but I understand if it is yours. I have often seen people use convoluted or slow patterns to satisfy the borrow checker when something slightly un-kosher would have been simpler, faster, and easier.
There's no Rabbi out there to mandate that your code is kosher, using unsafe is OK.
Also, the situation where you really need it are rare in practice (in 9 years of full time Rust, I've yet to encounter one).
Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation
#164Earlier quoted context omitted.
I truly do not understand why anyone would think Rust is abstracting things away. Like, to be clear: if you want to develop in Zig because you like it for whatever reason, you should do that. There is no world, nor will there ever be a world, where there's "one language to rule them all". This comment should not be read as "you should write Rust instead". I just don't find any of your descriptions of Zig to be things…
I think what happens is that people discover a new language, find that they really enjoy it and then struggle to explain why they like it. While they’re struggling they sometimes put down a “competing” language even if no one asked. They could say it just really vibed with them but they don’t.
I don't know of any other class of engineering that spends this much time on such weird attachments.
Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation
#165Earlier quoted context omitted.
I truly do not understand why anyone would think Rust is abstracting things away. Like, to be clear: if you want to develop in Zig because you like it for whatever reason, you should do that. There is no world, nor will there ever be a world, where there's "one language to rule them all". This comment should not be read as "you should write Rust instead". I just don't find any of your descriptions of Zig to be things…
Well, for example, every function that allocates expects allocator as an argument, it is not abstracted away. Resource deallocation is not abstracted away, you have to explicitly free your resources. Ever function that uses IO expects it as an argument. It doesn't have operator overloading, which is also an abstraction. It is a very explicit language.
Everything you're describing is a stylistic preference, though - and doesn't contribute to bloat, which is what the parent comment was implying. If your program is bloated, that's on you to clean up - it doesn't matter if it's in C, C++, Rust, or Zig. Every single one of these languages has nothing that stops you from getting it right.
(A weird aside but the downvotes on this chain are just odd to me. I'm not telling y'all to not write Zig, chill already)
Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation
#166Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation
#167In performing an assessment of which ecosystem and PL to use to develop our high-integrity automation software for mission-critical applications, we assessed Rust, Zig, and Ada/SPARK. Rust had the support behind it from a big corp., a passionate developer community, and some adoption by significant entities, but none with cyber-physical systems. And it has been interesting to see some developers leaving Rust for Zig…
https://ferrocene.dev/en/ is a Rust toolchain which has achieved some certifications for mission critical applications similar to Ada/SPARK.
Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation
#168Earlier quoted context omitted.
Are you trying to claim that Rust isn't safer than C++ for some kind of safety? I can't really see how you would argue that. It's memory safe, and it has a much stronger type system which reduces the chance of non-memory safety bugs. What type of safety are you thinking of?
Rust lacks type-programming features necessary for pragmatic type safety without performance concessions.
Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation
#169Earlier quoted context omitted.
I’d be really curious to know if there have ever been major snags being such an early adopter of a language (relative to comparable language options)?
Zig has been great. If anything we could merge critical features (e.g. io_uring, @prefetch builtin and others) into Zig in days or hours instead of years. In hindsight, Zig exceeded expectations, and the quality was exceptional to begin with.
Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation
#170Earlier quoted context omitted.
That has not been my experience with it, but I understand if it is yours. I have often seen people use convoluted or slow patterns to satisfy the borrow checker when something slightly un-kosher would have been simpler, faster, and easier.
unsafe exist for that very reason. There's no Rabbi out there to mandate that your code is kosher, using unsafe is OK. Also, the situation where you really need it are rare in practice (in 9 years of full time Rust, I've yet to encounter one ).
I encourage you to write a doubly linked list in Rust if you want to understand what I mean about "un-kosher" code. This is a basic academic example, but Rust itself is the rabbi that makes your life suck if you stray off the narrow path.
I write a decent amount of system-level software and this kind of pattern is unavoidable if you actually need to interact with hardware or if you need very high performance. I have probably written the unsafe keyword several hundred times despite only having to use Rust professionally for a year.