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

Re: Indirect object syntax

Thread Previous | Thread Next
May 20, 2016 12:14
Re: Indirect object syntax
Message ID:
On Fri, May 20, 2016 at 10:32:37AM +0000, Ed Avis wrote:
> I see that there is a general consensus that indirect object syntax is
> discouraged and should be removed from documentation examples.  It is time
> to revisit Kent Fredric's proposal at
> <>?

While I don't favour indirect objection notation (other than print),
I'm weary of eliminating documentation about it. Documentation isn't
just to learn on how to code something, it's also very useful to
understand someone elses code.

There's still too much code out there which uses

    $obj = new Some::Class;

to throw indirect object notation documentation out of the window.
(For a long time, we told people that this was the way to create a
new object)

By all means, document the disadvantages of using indirect object
notation, but don't deprive people from their means to understand
existing code.


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