14 ms·
In performing an assessment of which ecosystem and PL to use to develop our high-integrity automation software for mission-critical applications, we assessed Ru
by eggy 1y ago
In 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 for the sheer enjoyment of using it instead. Our software will be controlling machinery overhead and other close coupling with machinery and people. Rust does not have the legacy in these areas or the ecosystem to cover formal verification. Zig was considered, but was even more new than Rust, and had similar disadvantages as listed for Rust. SPARK, a relatively newer PL, a subset of Ada, has legacy in high-integrity, mission-critical applications, and formal verification tooling that along with human review, makes it the strongest choice to meet the government's latest push for such critical software, and the language though verbose, is low friction to learn and apply. I found Zig to be a great second choice, and look forward to both Rust and Zig's future. Glad to see Zig moving along since Andrew started it. Congrats Andrew and the team currently pulling this off!
- 7thaccount 1y agoInteresting to see this. I bought a book on Ada 2012 awhile back. Pretty cool stuff - especially with Spark. The license model always made me uncomfortable for when you were using the commercial compilers though. Does this lock you into Spark forever?
- tayo42 1y ago>leaving Rust for Zig for the sheer enjoyment of using it instead. What do people find more enjoyable?
- lagniappe 1y agoSpeaking for myself, the community is more humble and kind on the zig side, and their chats are more on-topic.
- tkz1312 1y agoZig is orders of magnitude more pleasant and enjoyable to use than Rust.
- estebank 1y ago>>> Zig is more enjoyable than Rust >> Why is that? > Zig is more enjoyable than Rust You didn't really leave the GP more informed than before.
- yubblegum 1y agoMaybe GP can be informed by skimming the following links: https://doc.rust-lang.org/reference/ https://doc.rust-lang.org/reference/ vs https://ziglang.org/documentation/master/ https://ziglang.org/documentation/master/
- littlestymaar 1y agoIt's like saying bacon is better than cheese. I totally get why some people would feel that way, but it's far from a universal feeling. Tastes are just subjective.
- lenkite 1y agoI think most folks would agree that Rust is an "acquired" taste. You need to kneel to the borrow-checker and develop something like a Stockholm syndrome before you find the language delicious.
- vatsachakrvthy 1y agoIt's not kneeling it's literally just eliminating bugs. It's kind of like saying that we kneel to logic while doing math
- YouAreWRONGtoo 1y ago[dead]
- LexiMax 1y agoSome people enjoy the relative simplicity and straight forwardness of C, some folks enjoy the flexibility and zero cost abstractions C++ gives you. Some people can appreciate both. I actually like both languages for different reasons and I don't really understand why they're consistently being pitted against each other. Language wars are... for lack of a more appropriate and less-crass term... stupid.
- tayo42 1y agoWith limited time and mental energy and I woukd say the languages are fighting for attention. The war is over why should I pay attention and for territory in my head.
- LexiMax 1y agoBecause this industry is a knowledge-based industry, and it's a good idea in general to always be honing your skills and learning something new. Even if you don't have any intentions of using a new language in your day to day career, there's usually a few super-interesting morsels in there that you can add to your knowledge banks. I've personally lost count of the number of times I took a concept I learned in another language or technology stack and applied it to my day job.
- eikenberry 1y agoThere's a big difference between learning from a language and mastering a language and the competition is around the latter.
- LexiMax 1y agoIf you think that complaining about a language on the internet is an effective way to hamstring wider adoption in and of itself... I've gotta say the results leave much to be desired.
- hnlmorg 1y ago> Language wars are... for lack of a more appropriate and less-crass term... stupid. I couldn’t agree more!
- gorjusborg 1y agoZig feels like a better C with modern tooling. It is a tool that works for me. Rust feels like a better C++ with modern tooling. I am a tool that works for it.
- rishabhaiover 1y agoYou're a poet, kind sir.
- pyrolistical 1y agoThis is what people don’t understand. Zig and Rust are not competitors. Rust is a better C++ but C was the good part of C++.
- jb1991 1y ago> C was the good part of C++ This is certainly a very controversial opinion. The two languages should not really be compared or grouped together, not for at least the last 15 years, but probably much longer. Modern C++ features have been developed specifically to address all sorts of things that most C++ developers want fixed from the "C" part of the language's history.
- pjmlp 1y agoNah, C should be nuked, C++ is TypeScript for C, Microsoft was right that C was done on Windows, unfortunely they had a change of heart and eventually decided to support up to C17.
- gorjusborg 1y ago> C++ is TypeScript for C In what way? Typescript is really just an optional type system for javascript. I don't see the analogy with C/C++.
- RexFactorem 1y ago[dead]
- 1y ago
- ozgrakkurt 1y agoI find it easier to develop low level code like file format, async io library and similar stuff in zig
- anymouse123456 1y agoThey aren't even close. Trying to write Rust as a noob feels like being in a blackout swamp, waist deep in muck, fighting through thick air and trying, but failing to run from danger. Being utterly constrained in every direction. Writing Zig as a noob feels like having the clouds part to reveal a bright, sunny Spring clearing and suddenly being able to cover land in a cheerful group with clarity, purpose and focus. [Edit] Of course, this is purely subjective, obviously a skill issue and YMMV
- deleted 1y ago[deleted]
- didibus 1y agoKind of surprising, I could see why, but I find Zig more difficult than Rust, so ya, YMMV.
- lukaslalinsky 1y agoIn a way, it's a return to simpler times. I remember learning programming C and it was about programming computers, not abstract concepts. As languages got higher level abstractions, we lost touch with the computer. That's why programs are so bloated today. Zig respects that we are programming a computer, with concrete behaviours, it doesn't try to abstract things away, doesn't hide complexity, and yet gives you tools for managing it. That's why I enjoy it.
- oblio 1y agoYet computers are abstract concepts :-) And C is basically high level assembly for the PDP, which has little in common with x86, for example.
- pclmulqdq 1y agoThese arguments never really hold water for me. The C VM is flexible enough to apply to literally any piece of hardware with relatively few pains. For experienced systems programmers, it is also extremely easy to brain-compile C code. C++ and Rust are both much harder in this respect.
- pjmlp 1y agoAnd then they discover that -O3 has nothing to do with their brain compiler.
- ori_b 1y agoThe PDP is remarkably similar to x86. The complaints that people have written at length about typically come down to superscalar features not being exposed in the instruction set, which means that it can't be exposed to the programming model. On the other hand, every architecture that has tried to expose them so far has failed; nobody wants to manually apply the Tomasulo algorithm to their code, or manage shuffling data elements into and out of their cache hierarchy.
- coldtea 1y ago>Yet computers are abstract concepts :-) And food is just molecules, but we don't eat chairs because they're also molecules.
- coldtea 1y agoNot having to care for the fucking borrow checker. And far fewer concepts. And faster compiles.
- eggy 1y agoEnjoyment is part objective and a lot subjective. Mitchell Hashimoto who wrote Ghostty in Zig speaks about it here: https://youtu.be/YQnz7L6x068?si=VtH2FEAuW-SiFPHr&t=1415 https://youtu.be/YQnz7L6x068?si=VtH2FEAuW-SiFPHr&t=1415 I started with 6502 assembly and PET Basic in 1977, so for me, Zig is simpler, and jives more with me than Rust. OTOH, I chose Ada/SPARK for our product for the high-integrity, mission-critical aspect of our automation software. I programmed in Pascal back in 1988, and it has the same syntax, which I always found verbose and boring, but it is clear and structured and the concepts to achieve this level of high assurance are not too difficult. For ultiimate fun, I program in J/APL and now mainly BQN, so I am not a fan of verbosity! I would have been more attracted to Rust if it had kept ML-like syntax from OCaml and not the Algol-like curly braces of C/C++.
- chc4 1y agohttps://ferrocene.dev/en/ https://ferrocene.dev/en/ is a Rust toolchain which has achieved some certifications for mission critical applications similar to Ada/SPARK.
- deleted 1y ago[deleted]
- eggy 1y agoAdacore is doing great work. They have a Rust compiler, but the static analysis and formal verification is not quite there for the Rust toolchain and it does not have any where near the legacy for high-integrity, mission-critical apps. Not that it is not heading that way, but for us it is not there by a longshot to select it for our product.