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

Re: Indirect object syntax

Thread Previous | Thread Next
From:
Abigail
Date:
May 20, 2016 12:14
Subject:
Re: Indirect object syntax
Message ID:
20160520121610.GB3855@almanda.fritz.box
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
> <http://thread.gmane.org/gmane.comp.lang.perl.perl5.porters/128189>?
> 


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.



Abigail

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