Existential types in Rust
Existential types in Rust
Posted Apr 24, 2024 16:49 UTC (Wed) by tialaramex (subscriber, #21167)In reply to: Existential types in Rust by mb
Parent article: Existential types in Rust
In Rust I'd expect same file. There's no way this is escaping a crate, and I'd also expect that a whole module is too much.
What we learned about inference (from languages which have a lot more inference than Rust) is that too much hurts your head just as much as none did. This is, as I understand it, why Rust forbids inference for function signatures, which is part of how we got Existential Types so early - without them I can't return a closure because closures don't have names you can spell, so I wouldn't be able to write the signature for my function that returns a closure.
