develooper Front page | perl.perl6.language | Postings from May 2005

Transparent / Opaque references

Thread Next
Luke Palmer
May 27, 2005 13:59
Transparent / Opaque references
Message ID:
When we heard that Larry didn't acutally want $$foo to infinitely
dereference, some of us were overjoyed, and others severely
disappointed.  Both transparent dereferencing (infinite $$foo) and
opaque dereferencing (one-level $$foo) have their uses, but they are
definitely distinct.  Instead of adding different syntax for each
kind, I'll propose something different: two types of references:
Opaque and transparent.

Opaque references always need to be explicitly dereferenced (except
for binding an array to an array reference, etc.).  Transparent
references always automatically dereference.  The decision of what
type of dereferencing will go on is left up to the reference taker.

What I can't decide is which one \ will create, and how you will
create the other kind.  Also, I can't decide how to one-level
dereference the transparent references so that you can change them.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About