Rust dev, I enjoy reading and playing games, I also usually like to spend time with friends.

You can reach me on mastodon @sukhmel@mastodon.online or telegram @sukhmel@tg

  • 0 Posts
  • 254 Comments
Joined 1 year ago
cake
Cake day: July 3rd, 2023

help-circle

  • To be fair, I disagree with all the points author makes, except for performance which is important but may be less important than code clarity in different cases. I am surprised that exceptions perform that well, and I am surprised the author said that compared C++ exceptions to Rust results, but actually did the right thing and compared C++ exceptions with C++ expected first. I thought it was going to be one of those “let’s compare assembly to lisp”





  • you never know what code your function or library calls that can produce an exception

    As far as I remember, there were several attempts at introducing exceptions into type system, and all have failed to a various degree. C++ abandoned the idea completely, Java has a half-assed exception signature where you can always throw an unexpected exception if it’s runtime exception, mist likely there were other cases, too.

    So yeah, exception as part of explicit function signature is a vast improvement, I completely agree








  • lad@programming.devto196@lemmy.blahaj.zoneLoona rule
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    Better start with this book, Rust will feel natural after that: Learn you a Haskell for the great good by Miran Lipovača

    But you are right, it is better suited for one things and worse for other. It’s not strictly functional, though, and most likely when it will have been maturing for as long as C++ or at least C# it will also have tools and features that make it better suited even for game development