Elektrine lite

← Feed

@pewpew@feddit.it

Post #3881369

2026-07-17 09:04 UTC

What part of Rust is fun? C is fun to me because the syntax is easy to understand and straight to the point. C is also great for learning low level coding, I find Rust so confusing

Replies (5)

  • @slacktoid@lemmy.ml 2026-07-17 09:55

    Rust requires you to unlearn some of the C and CPP habits. And so it’s like learning a language that approaches things differently. That is pretty fun to see how another language solves a problem etc. I think rust is a very fun and interesting language tbh. But you are free to not like it, that’s all good man. That’s why we have different languages. After getting into rust, for me, you need to convince me to use C or Cpp, they have their niches for sure, but rust allows that too like embedded programming etc.

    Open ##3882300

  • @iopq@lemmy.world 2026-07-17 10:12

    Yes, C syntax is easy understand

    Open ##3882626

  • @Auli@lemmy.ca 2026-07-18 00:18

    Also really easy to introduce bugs. But from how everyone online talks about being good developers is all you need. I don’t know how those bugs get there in the first place.

    Open ##3898782

  • What part of Rust is fun? C is fun to me because the syntax is easy to understand and straight to the point. You probably had never the pleasure to search for bugs caused by C Undefined Behaviour in multithreaded code. When I was writing my diplima thesis, I was writing multi-threaded code for an embedded DSP system. Results were wrong all the time. I tracked it down to atan2() giving wrong results. I searched for about six weeks how to fix that and it disappeared when I changed the position of the program’s data segment. (If the concept of Undefined Behaviour is new to you, I can recommend the web pages of Jens Regehr). The above debugging experience was 25 years ago. We have better languages now. Rust has no Undefined Behaviour. That means you can track any bug (except compiler bugs) deterministically down to where the actual logic of the code, and the model of it which was in your head depart. This is great. Rust is fun because you can compile a complex program and it runs. But industry is still working with a fifty year old language written for systems where 32 kilobytes were a lot of memory. At work, I am still searching for bugs in multi-threaded C code with manual memory management (the previous developer didn’t think this needs locks), and I have to explain to the CTO that no, wo won’t have a release this fall, while the company literally drowns in technical debt.

    Open ##3903330

  • @asdfasdfasdf@lemmy.world 2026-07-17 20:44

    Rust us way easier to understand for me (and I’d guess most people) than C. Rust is fun because it’s the only mainstream language with an affine type system, which allows some really cool patterns like the typestate pattern. And the fact that there’s no inheritance or null or exceptions is amazing.

    Open ##3966224