• calcopiritus@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    15 hours ago

    I don’t know what you read on my reply. But your reply makes no sense.

    Let me rephrase it if you prefer:

    Claiming that Rusty’s borrow checker is reference counting is hugely misleading. Since the borrow checker was made specifically to prevent the runtime cost of garbage collection and reference counting while still being safe.

    To anyone unaware, it may read as “rust uses reference counting to avoid reference counting, but they just call it borrow checking”. Which is objectively false, since rust’s solution doesn’t require counting references at runtime.

    I don’t know what mutable string or any of the other rant has to do with reference counting. Looks like you’re just looking to catch a “rust evangelist” in some kind of trap. Without even reading what I said.

    • Log in | Sign up@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      7 hours ago

      A boolean is a non-negative integer with a maximum of one, often literally, but I see that calling the borrow checker a static reference counter with a maximum of one is frustrating you in the same way that you calling roc’s reference counting a garbage collector is frustrating me.

      The string example is because the thing you’re calling runtime overhead is cheap compared to freeing up a string that’s been extended even just a couple of times. It’s not a trap. It’s an example where freeing the string itself could be considerably more expensive than the DEC c and BRZ that you’re calling overhead.

      It’s a bit hypocritical to tell me off for not reading what you said when you haven’t bothered to figure out the relevance of the memory management examples I gave and just dismissed them out of hand as “rant” and a “trap”.

      • calcopiritus@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        3 hours ago

        I haven’t read 90% of your comment since it is out of the topic of the discussion. The “trap” is trying to argue with mee about something I haven’t even mentioned.