News for hackers. Stuff that matters.
Re:Swift is a more convenient Rust by koverstreet on Friday September 06, 2024 @09:09AM (#41465841)
Could you elaborate? I would think Vec<Option<Infallible>> would have to be a bit vector.
Re:Swift is a more convenient Rust by zozbot234 on Friday September 06, 2024 @09:28AM (#41466006)
Infallible is a clunky name for the Never type in Rust, i.e. a type that has no values and cannot be instantiated. Thus, Option<Infallible> only has a single value, viz. None. Then Vec<Option<Infallible>> is isomorphic to Vec<()> which reduces to a length field - there's no other data associated with it.