`From` and `Into` slide should emphasize losslessness and infallibility
fw-immunant opened this issue · comments
The standard library docs mention this:
The
From
trait is intended for perfect conversions. If the conversion can fail or is not perfect, useTryFrom
.
But it's easy to miss one line in the docs; I think we should emphasize this in the speaker notes. It also isn't necessarily obvious what "perfect" means, so I think "lossless" is a better way to describe the contract of these traits. This is worth underlining because the commonsense notion of being able to convert between types may also apply to things like C-style casts that truncate and are not appropriate for these traits.