in reply to Re^3: MCE::OrdHash naming Push and Unshift methods supporting merging and reordering
in thread MCE::OrdHash naming Push and Unshift methods supporting merging and reordering

This is done and committed into trunk. All methods names begin with an upper case letter for consistency. Keys, Values, and Pairs are compatible with the same in MCE::Shared::Hash which lacks indices for not being ordered.

## KeysInd (indices), ValuesInd (indices), PairsInd (indices) ## Keys (keys ), Values (keys ), Pairs (keys ) ## Pop, Push (merge ), Shift, Unshift (merge ), Splice ## PushNew (reorder), UnshiftNew (reorder),

Thus, MCE::OrdHash is mostly compatible with Tie::IxHash except for Keys and Values which take keys as arguments, not indices. KeysInd and ValuesInd come included receiving indices for compatibility.

Thank you, Mario

  • Comment on Re^4: MCE::OrdHash naming Push and Unshift methods supporting merging and reordering (Solved)
  • Download Code

Replies are listed 'Best First'.
Re^5: MCE::OrdHash naming Push and Unshift methods supporting merging and reordering
by GrandFather (Saint) on Aug 21, 2015 at 08:32 UTC

    That all looks fine and consistent to me. I don't see Tie::IxHash as a particularly compelling driver, although I concede that using something common as a template is better than just inventing stuff. However, consistency in a name space (i.e. with MCE::Shared::Hash) is better still.

    Premature optimization is the root of all job security

      I appreciate the enlightenment given and like PushNew and UnshiftNew a lot. Thank you.