Arbitrary

joined 1 year ago
[–] Arbitrary@reddthat.com 1 points 1 year ago (1 children)

As a user of any higher level data structures there's no way for you to know what happens to values passed though. You're absolutely right that if you were using nothing but the stdlib you always know (mostly) that you are explicitly calling forget.

The problem is that you don't know that to be the case as the consumer of a library without a thorough audit of the library. Especially when dealing with ffis things get very muddy very fast.

[–] Arbitrary@reddthat.com 5 points 1 year ago (3 children)

As much as I'd love for this to happen, I'm uncertain if editions are robust enough for this to happen. I feel like, in 10 or so years, there needs to be a breaking edition addresses some of these concerns.

It's super hard to get everything right the first time and I think rust has done an excellent job of ensuring that we're moving forward incrementally but a leak trait makes things so much nicer in the long run.

Leaking might be safe, but not knowing that somewhere in the stack you're forgetting values is so hard to know when you want to build very long running programs

[–] Arbitrary@reddthat.com 2 points 1 year ago

I blame sleeplessness

32
submitted 1 year ago* (last edited 1 year ago) by Arbitrary@reddthat.com to c/rust@programming.dev
[–] Arbitrary@reddthat.com 3 points 1 year ago

Yes, as far as I'm aware this is only focusing on compile times.

[–] Arbitrary@reddthat.com 3 points 1 year ago

Neat work, I'll be sure to take a peek later.

view more: next ›