New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetHash::push not implemented #5559
Comments
From @gfldexmy SetHash $sh .= new; $sh.push('a'); # OUTPUT: # Any::push tries to call SetHash::push and fails because there is no such |
From @lizmatWill look at this as part of a Set/SetHash overhaul
|
The RT System itself - Status changed from 'new' to 'open' |
From @lizmatLooking at implementing this for SetHashes / BagHashes / MixHashes, I’m not sure we should do this. Because, even though you could consider SetHashes/BagHashes/MixHashes as Hashy things, the semantics of a .push and an .append would be very much different from Hash.push/append. That’s because Hash.push/append expects (implicit) key/value Pairs, whereas Sets/Bags/Mixes would only be able to take keys. I *do* see the benefit of being able to add a list of values onto a SetHash/BagHash/MixHash. I’m not sure it should be called .push or .append. On the other hand, you could consider the Hash.push/append the odd ones out… Suggestions?
|
From @smls
One can already do: $sethash{@new-items} = True xx *; But admittedly, that's not as newbie-friendly. |
From @zoffixznetOn Mon, 29 Aug 2016 04:12:57 -0700, smls75@gmail.com wrote:
I wouldn't call that expert-friendly either. Values aren't the interesting bit of sets and them being True is on the implementation-detail side of things. Moreover, that construct won't work with baggies. |
Migrated from rt.perl.org#128903 (status was 'open')
Searchable as RT128903$
The text was updated successfully, but these errors were encountered: