I would barter all of these improvements for a less noisy but performant elemement accessor syntax:
i.e.
$it->{$key}->[$idx]->{section}->[$i]->{'some.doc'}->method1()->[sub1 +(5)]->method2($x); # or $it->{$key}[$idx]{section}[$i]{'some.doc'}->method1()->[sub1(5)]->me +thod2($x);
becomes something like:
or something smarter...$it->@( $key $idx section $i some.doc method1() sub1(5) method2($x) +);
Disambiguation: If the actual element is blessed and can('method1'), it is invoked. Otherwise it is treated as a function call (:: might be used for further disambiguation).
I.e. similar to Data::Diver, just more efficient together with a pragma or other method to control auto-vivification. Yes, I am aware, that I could build something similar as a module, but it would be pure Perl.
In reply to Re: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by Perlbotics
in thread What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by likbez
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |