Skip to content

std::hash + collections::hashmap #161

@abonander

Description

@abonander

I can work on these as I've had experience with hashmaps in the past, and I just completed a small project where I had to work out some nuances with hashmaps and lifetimes (I was trying to use references [specifically string slices] as keys).

Topics (ref is an arbitrary reference type, struct or enum):

  • HashMaps, basics and use cases
  • Alternate key types, glossing over primitives and focusing on structs with #[deriving(Eq, Hash)]
  • HashSet<ref>
  • SmallIntMap<ref>

Not sure whether I should go into the underlying implementation of a common hashmap or just how to use it. Maybe compare HashMap<int, int/ref> to Vec<int/ref> and why one would prefer one over the other, and then introduce SmallIntMap<ref> as a specialized alternative. I could present my use case for Hashmaps, an RPN calculator with user-defined variables, or maybe a basic memoizer app (setting values to keys via CLI and retrieving).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions