(no title)
ltratt | 4 months ago
I don't think Rust's design in this regard is ideal, but then again what language is perfect? I designed languages for a long while and made far more, and much more egregious, mistakes! FWIW, I have written up my general thoughts on static integer types, because it's a surprisingly twisty subject for new languages https://tratt.net/laurie/blog/2021/static_integer_types.html
quotemstr|4 months ago
You can define a set of objects for which this transformation is illegal --- use something like pin projection to enforce it.
ltratt|4 months ago