Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff

by tobyink (Canon)
on Sep 11, 2020 at 08:44 UTC ( #11121602=note: print w/replies, xml ) Need Help??


in reply to Re: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
in thread What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff

Potentially ambiguous. What if $it->{$key} returns a blessed scalarref that overloads both @{} and %{}? Is the next step $it->{$key}[$idx] or $it->{$key}{$idx}?

  • Comment on Re^2: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by Perlbotics (Bishop) on Sep 11, 2020 at 17:12 UTC

    Good point. That's the drawback where edge-cases can add a lot of complexity.
    Perhaps throw an exception? Allow annotations on how to resolve (see below)? Implicit rules? — down the rabbit hole of smart-matching :(

    Example: Resolve overloaded @{} by using the standard notation as a hint like so?

    $it->@( $key [$idx] section $i some.doc method1() sub1(5) method2($x) +);
    It should be rarely needed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11121602]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2023-12-09 00:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (37 votes). Check out past polls.

    Notices?