SE-0519: Borrow and Inout types for safe, first-class references

This seemed to be one of the most liked spellings when I suggested something similar a couple of years ago. It was slightly different because I optimized for immutable bindings:

ref x = y      // immutable borrow
ref var x = &y // mutable borrow

for ref x in array {}
for ref var x in &array {}
2 Likes