On Jul 7, 2009, at 2:54 PM, Yuval Kogman wrote:
2009/7/7 Hans Dieter Pearcey <h...@pobox.com>:
Bag is going to be renamed to Hash::Counter, probably. Counter is
secretly
Num::Counter, or something, though not really since Num doesn't
exist (yet).
Do we really need to keep Bag? I don't think it has many practical
applications.
The API is intended to implement an actual bag (that is, a member can
appear multiple times), but is obviously flawed:
1. it exposes implementation details if the hash is readable
2. it doesn't support arbitrary data, it stringifies
So I think it's best if we keep it in MX::AttributeHelpers for
compatibility, but simply drop it from core.
I second this.
Bag was really written as an example of how you could use MX::AH with
any data structures, not just the perl built-ins.
And I whole heartedly agree, the implementation is shit.