It doesn't sound like they are talking about invalid states, more like they are taking about the kind of thing that in Rust would be represented by `Option<Box<dyn SomeTrait>>` or suchlike. Maybe your point is that in Rust much less ceremony is necessary to avoid hitting a null pointer when doing this. But still, in either language it's easy to end up with hard to follow logic when doing this.
DanielHB|6 months ago
For example this is something you can do with typescript.
the Arguments { a: 1, b: 1, c: 1 } is not representable.0x457|6 months ago
Only if there is a niche optimization happens if T is never null, otherwise it's a tagged union.
That's not what you're replying to is about.
qzzi|6 months ago