develooper Front page | perl.perl5.porters | Postings from July 2011

Re: [PATCH] [DOCS] Modernize perlopentut.pod

Thread Previous | Thread Next
From:
Jesse Vincent
Date:
July 20, 2011 10:29
Subject:
Re: [PATCH] [DOCS] Modernize perlopentut.pod
Message ID:
20110720172911.GB22627@fsck.bestpractical.com



On Wed, Jul 20, 2011 at 10:10:27AM -0600, Karl Williamson wrote:
> I believe the 3-argument open should be the one stressed in a tutorial.

+1

2-arg open can be used correctly, but is easier to screw up. We don't
need to teach people all the ways to do it in an intro tutorial. We 
need to teach them at least one good way to do it and to point them
toward the reference documentation that explains all the rope a given
feature provides and explains all the variant forms they might encounter
in the wild.  If perlopentut were the only place we documented two-arg
open, we'd be in a lot of trouble. Thankfully, it's not.

Perl's built in tutorial documentation should steer new users in a
reasonable direction and provide them with the tools they need to
write good Perl code.  When a tutorial tries to be exhaustive, it ends
up exhausting and often fails at its primary goal. 

Similarly, I don't think perlopentut.pod should cover one-arg open.

On an almost-related note, I can foresee a future where a program running
in a lexical scope declared to be v5.30 (or whatever) doesn't have 2-arg
open available to it, but that's neither here nor there[1].

Best,
Jesse




[1] Ok, it's very firmly ------>there


-- 

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