develooper Front page | perl.perl5.porters | Postings from May 2016

Re: Indirect object syntax

Thread Previous | Thread Next
Eric Brine
May 31, 2016 16:34
Re: Indirect object syntax
Message ID:
On Wed, May 25, 2016 at 12:47 PM, Abigail <> wrote:

> I'd argue [] doesn't belong in core. At all.

> The reason is it's limited usefulness. People who want to use indirect
> object syntax certainly won't start their programs with 'no indirect'.
> It's only useful for people who don't want indirect object syntax in
> their programs, but somehow use it anyway.
> I don't think there's much code which will benefit from it, and the
> amount of code will dwindle over time.

It if worked, it would be useful for people who don't want indirect object
syntax in their programs, but **accidentally use something that's
interpreted as indirect object notation**.

One of the problems with indirect notation is that it causes really weird
error messages for certain syntax errors and for certain missing

C<< no indirect; >> is suppose to remove support for indirect object
notation, which would avoiding these odd error messages. Right now, it's
not able to achieve that. To achieve that, it would it needs support in the
parser that doesn't currently exist.

Thus, *needs* to be moved to the core to be useful.

On Wed, May 25, 2016 at 06:32:06PM +0200, Vincent Pit (VPIT) wrote:

> Even if that's not the topic of this thread, I will reiterate that I
> would strongly object to incorporating the current implementation of
> indirect in core. That's not the way you should do it when you can just

hack into the parser.

Indeed. It shouldn't be incorporated as is. There'd be no point to doing
that. The interface should be incorporated, but it should prevent indirect
object notation from being recognized rather than checking if it was used
after the fact.

- Eric

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