eclectic icon indicating copy to clipboard operation
eclectic copied to clipboard

Determine `LinkedList`'s fate

Open apasel422 opened this issue 9 years ago • 1 comments

Should it implement List? Should we add the following method (and/or a corresponding associated type or associated const) to List?

fn is_random_access(&self) -> bool;

apasel422 avatar Jan 26 '16 15:01 apasel422

We expect different implementations to have different performance trade-offs. To me random access would feel like the collection supported the Index trait. It is surprising at the moment that the LinkedList is not a form of List.

gilescope avatar Apr 02 '18 20:04 gilescope