develooper Front page | perl.perl5.porters | Postings from August 2013

Re: postfix dereference syntax

Thread Previous | Thread Next
From:
David Nicol
Date:
August 12, 2013 23:40
Subject:
Re: postfix dereference syntax
Message ID:
CAFwScO9_fGFss6BYTTpkAoKUn79mv-7rRqrebRG8bhmbNcTwhw@mail.gmail.com
On Mon, Aug 12, 2013 at 5:56 PM, Father Chrysostomos <sprout@cpan.org> wrote:
> David Nicol wrote:
>> what's the advantage of $coderef->&* over $coderef->() ???
>
> $foo->&* means &$foo, so:
>
> \$foo->&* # \&$foo

oh. Whack is looser bound than these things. I've been writing $foo->&*->\*



> $foo->&*  # &$foo -- sub call sharing @_
> goto $foo->&*;
>
>> Also, how about postfix reference operator?
>>
>>      my $scalar;
>>      my $reference = $scalar -> \*; # instead of \$scalar
>
> Then $x = $x->[-1] becomes $x ->= [1->-*].

that's silly.  Allowing whack would not be silly if a prefix whack
binds tighter than a skinny arrow, but it doesn't.

I'll change those accordingly and send the revised version.

Thread Previous | 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