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

Transparent / Opaque references

Thread Next
From:
Luke Palmer
Date:
May 27, 2005 13:59
Subject:
Transparent / Opaque references
Message ID:
7ca3f0160505271359edb7873@mail.gmail.com
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.

Luke

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About