2

Made this little example to show the difference in codegen quality using Gc smart pointers versus reference counted Rc's can make

Actually pretty crazy:

https://godbolt.org/z/vsTeGcz8M

Comments
  • 2
    @retoor that was my first impulse also but then I remembered that Rust is more than just memory safe C++.

    A more appropriate question, imo is:
    If you want to get rid of the syntax bloat of Rust‘s memory management, why not use Swift? ^^
  • 1
    @retoor what’s a 3rdparty sandwich?
    It sounds naughty.
  • 0
    @retoor Sorry, haven't read it yet
  • 1
    @Lensflare I want to try swift at some point but I also just really like Rust
  • 0
    @retoor I can emulate C in Rust with 3 lines of code, it's very simple. The whole point is that it's *also* memory safe :P
  • 0
    @retoor I don't really remember, but if valgrind found anything than probably because some singleton was persistently allocated until the end of the program. There's not really anything wrong with that since the OS will clean up the memory at end of process. In fact I optimized my latest isspam version to leak values at the end so that drop impls don't increase run time :P

    And if you like Swift, then do swift. I don't have anything against it. I just really like rust
  • 0
    @retoor I dunno, i'm not a vibe coder, but I am pretty knowledgeable when it comes to very low level and interpreter programming

    Rava seems pretty good! I wonder how you are doing memory management though... I haven't seen any garbage collection or similar in the code
  • 1
    @retoor sorry I don’t want to give you my email. I‘m not reading emails anyway ^^
    Maybe discord, but lately I‘m getting enough message spam already ^^
Add Comment