• DacoTaco@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    6 months ago

    Thats interresting, thanks! Stuff for me to look into!
    I also think halfway through the conversation i might have given the impression i was talking about pointers, while it was not my intention to do so. That said, the readonly/mutable reference thing is very interresting!
    Ill look into what rust does/has that is like the following psuedocode :

    DataBaseUser variable1 = GetDataBaseUser(20);
    userService.Users.Add(variable1);
    variable1 = null; // or free?
    [end of function scope here, reference to heap now in list ]

    • mhague@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      5 months ago

      No problem. I’m no guru and I’m currently on Zig but I think learning some Rust is a really fast way to hone skills that are implied by other languages.