Re:Linear types can change the world (1990) [pdf]
by qznc on Tuesday January 09, 2018 @10:32AM
(#16106846)
Their siblings, affine types, change the world in the form of Rust. ;)
[ Parent
| on HN ]
Re:Linear types can change the world (1990) [pdf]
by tomjakubowski on Tuesday January 09, 2018 @02:21PM
(#16108919)
Could you elaborate? There isn’t much of a discussion there of the benefits from making Request affine.
Re:Linear types can change the world (1990) [pdf]
by carry_bit on Tuesday January 09, 2018 @04:16PM
(#16110176)
headers_mut is only defined on Request<Fresh>, and you can only write body data using Request<Streaming>. This makes it so it's a type error to try to modify the headers after you already sent them.