4 ms·
It's definitely not orthogonal. Mutable borrows require affine types.
by cwzwarich 9y ago
It's definitely not orthogonal. Mutable borrows require affine types.
- kibwen 9y agoMaybe not completely orthogonal, but I was thinking specifically of how treatment of immutable borrows show how one could partially tack on borrowing semantics to a non-linear/affine language for at least a modicum of use-after-free protection, and also it's a common misconception that linearity ("ownership") and the borrow checker are synonymous rather than distinct-though-intertwined concepts.
- moosingin3space 9y ago> how one could partially tack on borrowing semantics to a non-linear/affine language How might that look if you tried to do this in, say a (not compatible with C) C-like language? I thought the ownership system (affine types) was required for the borrow checker to work.