dysfun@treehouse.systems ("gaytabase") wrote:
if you try and squeeze rust into the 'linear types' mindset, then a reference is a way of weakening the 'must use exactly once' requirement (and it's finally discharged by drop insertion if you don't get rid of it).
but the interesting thing is that reference is a global type, meaning any type may be weakened. it doesn't necessarily mean it will be useful to weaken it - utility is dependent on functions being written to take references. but it's always possible.