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

Re: Transparent / Opaque references

Thread Previous | Thread Next
June 2, 2005 11:53
Re: Transparent / Opaque references
Message ID:
"TSa (Thomas SandlaƟ)" skribis 2005-06-02 20:36 (+0200):
> Might it be applicable to use .() as the dereferencer
> of scalar variables that derefs to the next none(Ref)
> type and if that is a Code it dispatches to it as expected?

Or perhaps postfix $, to deref recursively.

    my $foo = 5;

    my $bar = \\\\\\$foo;

    print $bar$;  # 5

Just don't call your variable $Id ;)

Or of course a very simple .deref method.

I still think the feature isn't needed at all. 

> $y() = 7;

No, sorry, that looks to me as if $y is a reference to an lvalue sub,
not like any form of referencing of scalars.


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