Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: I use postfix dereferencing ...

by Don Coyote (Hermit)
on Feb 04, 2019 at 15:50 UTC ( [id://1229360]=note: print w/replies, xml ) Need Help??


in reply to I use postfix dereferencing ...

This looks like a really useful feature. More ways to do a thing helps you understand the thing you do. One look at the Documentation and (de-)referencing seemed more like it's own operation, rather than something that needs to be done differently for each data structure or variable type or scoping function or Thing.

Perl 6 is object orientated, and this feature appears to be aligning Perl 5 with some of that kind of thinking. But objects in Perl 5 are not the same as objects in a fully qualified objective language. Though tends to be preferred for reasons of mnemonicisity and security and so on.

The perliness of this is that it is using method invocation to implement a (de-)referencing operation in a somewhat recursive manner. As to invoke a method on something, that thing needs to be a reference. So there's potentially also some auto-vivication at play here with the assignment capabilities.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found