demerphq kicked off a discussion on blogs.perl.org of the hash APIs that Perl (and perl) provides. The discussion also has a parallel strand on nntp.perl.org.
In my interpretation, the discussion moved on from removing restricted and locked hashes towards realizing that restricted and/or locked hashes can get a different hash implementation in the backend than plain hashes and maybe even plain hashes can get different implementations. This makes me somewhat happy because I really like using locked hashes for DBI query results and don't really care for the (potential) performance overhead.
Other people see a benefit in removing the performance overhead incurred by supporting restricted hashes, which I don't know about. But as these people know more about the internals, I'm inclined to trust them on their judgement as well.
Allowing different implementations of hashes opens up the interesting question of if or how a hash can move from one implementation to another, and personally I expect that only to happen for explicit assignments:
use feature 'superfast_hashes'; my %hash_with_implementation_A = ( foo => 'bar' ); no feature 'superfast_hashes'; my %hash_with_implementation_B = %hash_with_implementation_A;
If you have an opinion either way on the features of locked / restricted hashes, consider participating in the discussion either on nntp.perl.org or blogs.perl.org
choroba points out more discussion on reddit r/perl.
In reply to Are Restricted/Locked Hashes a Failed Experiment? by Corion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |