Re:Parse, don’t type-check
by MetaDark on Thursday November 26, 2020 @05:42PM
(#25224073)
No, but you can always encode this augmented information in types to make it explicit, and possibly help the compiler make optimizations. Using a weaker type when you can use a stronger type is just as bad as removing type information.
[ Parent
| on HN ]
> No, but you can always encode this augmented information in types to make it explicit
Technically yes, but not all type systems make it practical, or really relevant e.g. you can encode nullability in a type in java… but your reference to your Optional is still itself nullable.