4
zshh
6y

Being fairly new to the software game I’ve yet to tried my fair share of languages, both at work at a professional level and small to medium sized projects at home. I’m now starting to see patterns and different features in languages, and I must say that Rust is a language that blew me away totally.

I read the online book and then I wrote a few small programs. It feels super modern with all the cool features and it’s so fast. The threshold can be high, depending on your background.

I’m no pro using the language at all, but I enjoy it so much. I urge you to try Rust for your next project. The community around the language is also very interesting and welcoming.

What are your experiences with Rust?

Comments
  • 1
    None but its on the planning. Mainly for webassembly
  • 0
    Rust can be fun but very tricky imo. It's different from the C-like languages, very strict. I have only written 2 applications in it though. My website backend with rokeckt.rs and a 'sticky-lexicon'.

    I never understood .unwrap(), variable ownership and a few other things.

    Lexicon: https://github.com/olback/...
    Website: https://github.com/olback/...
  • 1
    @olback I agree, it can be hard to understand sometimes, especially with the lifetime and ownership.

    Unwrap on the other hand is not too hard to grasp, you need to use it when you have a type of either Option or Result. If you’re worked with Optionals in Java it’s the same thing. The type is like a box that could contain something or not. And doing unwrap() you basically assume you have a value/have a good value.

    A more elegant way is to do

    match option_var {
    Some(value) => // handle value,
    None(_) => // handle case where there’s no value
    }

    It’s a way of dealing with errors like regular values, instead of having special case exceptions. Much nicer, imo. Hope this makes sense. The Rust book has lots of good stuff around all the concepts in the language.
Add Comment