6 ms·
Zig 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.
by gorjusborg 1y ago
Zig 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]
- npalli 1y agoRust is a worse C++ with modern tooling.
- jandrewrogers 1y agoRust needs stronger compile-time features and capabilities if it wants to be a better C++. This is critical functionality for many types of safety.
- IshKebab 1y agoAre 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?
- orochimaaru 1y agoWould you be able to elaborate on some specific ones? I’m just curious. My space is mainly data engineering and Rust is making major moves there along with the entire Python ecosystem. Rust’s main point is memory safety which is why it’s also a preferred language to reengineer cryptography libraries. I’m interested in the embedded space (along with AI applications) and believe rust will be a language of choice for the entire toolchain here. So I’m definitely interested in what gaps you see.
- eggy 1y agoThere's more than just memory safety for high assurance apps. Personally, I think Rust is heading in the right direction, but I am not sure it's complexity will ever be smooth or enjoyable for some. I feel you get most, if not all, that Rust is trying to achieve with Ada/SPARK right now for high-integrity, mission-critical apps along with a proven legacy: jet fighter software, railway controls, avionics, embedded, space, etc... Take a look at the Adacore site, especially the free books (PDF): https://www.adacore.com/books https://www.adacore.com/books Ada for the Embedded C Developer Embedded Spark & Ada Use Cases
- Ygg2 1y ago> It is a tool that works for me. Is it? Or is it a tool that won't bug you when you make a mistake? Programmers tend to, as Djikstra noted[1] confuse ease of programming with allowing unforced errors. [1] https://en.wikiquote.org/wiki/Edsger_W._Dijkstra#1970s https://en.wikiquote.org/wiki/Edsger_W._Dijkstra#1970s
- coldtea 1y ago>Is it? Or is it a tool that won't bug you when you make a mistake? I don't want tools to bug me EVER. This includes when I make a mistake. When I want a tool's opinion, I'll ask for it - through a linter, a static analysis tool, etc. >Programmers tend to, as Djikstra noted[1] confuse ease of programming with allowing unforced errors And how long had Djikstra worked as a professional programmer?
- Ygg2 1y ago> I don't want tools to bug me EVER. This includes when I make a mistake. If that is your true wish, may I recommend JavaScript? It's a language famous for not complaining about errors. Or WASM/ASM if you want something closer to the metal. I personally, want the undefined behaviour Chernobyl to beep before it melts. > And how long had Djikstra worked as a professional programmer? According to his wiki if you disregard his tenure at University of Austin, between years 1952 to 1984. So around 32 years. He's literally first Dutch programmer. Yes. He was a programmer before it was a recognised job.
- surajrmal 1y agoMost people stop feeling like they are fighting with rust a few months into using it. The borrow checker is something that becomes second nature and you still use the same techniques that would please the borrow checker outside of rust because it's generally better program structure in many cases and avoids bugs. If you want to do something that you know us correct that rust normally doesn't allow, just use unsafe. It's not the end of the world. You don't need to resort to a different language to achieve that same result. This isn't to say it's better or worse than zig. If you're developing software and zig works for your needs, go for it. I'd like to see it used on a 100+ person project to see how it might hold up to the problems that I tend to see in c++, which largely arise for people not knowing about constraints that are not tracked explicitly by the compiler. On projects with less people, this doesn't happen as often.
- coldtea 1y ago>Most people stop feeling like they are fighting with rust a few months into using it. The borrow checker is something that becomes second nature People keep saying that, but I've also seen many who've used Rust for years, in big projects, say the opposite: it gets slightly better as you learn to oblige the borrow checker instictively, but it remains always a kind of annoyance and a friction.
- surajrmal 1y agoPerhaps that's due to only learning how to treat the symptoms rather than the cause. Building intuition requires understanding why the compiler prefers something different. People coming from C++ tend to get this fairly quickly as they understand the problems rust solves for them, but folks coming from higher level languages don't always see it the same way because they may have not had to deal with those problems.
- cakealert 1y agoThe ergonomics of unsafe rust are abysmal. It would have been 10 times better if they just let you do inline C instead.
- pjmlp 1y agoMore like Modula-2/Object Pascal safety packaged in a C like syntax.