Hacker News new | ask | show | jobs
by clord 1155 days ago
&T, &mut T, and T are all different types in a sense. Hence ref is transmuting types during restructuring.

Really, they are adding a new view, so perhaps this is like Haskell lenses, where you can make views with a different type that acts on underlying data