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

Re: Don't patch perlopentut: rewrite it completely

Thread Previous | Thread Next
From:
Christian Walde
Date:
February 18, 2013 17:59
Subject:
Re: Don't patch perlopentut: rewrite it completely
Message ID:
op.wsnb3e1nydyjqt@digitizedsqueak.fritz.box
On Sun, 17 Feb 2013 02:30:02 +0100, Tom Christiansen <tchrist@perl.com>  
wrote:

> Nearly every one of those is non-simple. That is not a tutorial, and it  
> is not just about open.  It is more like "FMTEYEWTK About open() and I/O  
> in Perl". If the goal is to create a document that teaches people how to  
> use
> open() for the simple cases, then there is no hope for perlopentut.  It
> cannot be turned into that, because that is not what it is.  You have to
> start over.

When you started talking about Programming Perl (a reference work) in  
relation
to perlopentut (a tutorial) i had the suspicion that the discussion had  
become
orthogonal. Thank you for realizing that and acting upon it so quickly and  
in
such a massively productive manner.

Reading through your sketch, i like the tone a lot, as well as the  
contents. I
especially like that it takes care to show how to read code on this  
subject,
which is more important than learning how to write.

> I'm still undecided about sysopen: should it stay or should it go?

Anecdotally: I have been reading and writing Perl since early 2005 and  
cannot
recall an instance of either reading about or writing sysopen. While i  
would
not be bothered by seeing it remain, i do not think that removing it would  
do
any harm.

As for the sketch itself, there are a few things i noticed:

> For _eveyrthing_ else,

>     open($handle, "< $encoding", $filename)

Maybe mention that the space is optional and can be included for  
readability?
I normally see it without.

> However, if hitting EOF is an expected and normal event, you
> would not ____ to exit just because you ran out of input.  Instead,

>     use open qw< :encoding(UTF-8) >;

Maybe mention in some way that this is lexically scoped?

I ran out of time at this point, will read the rest and comment as  
appropiate
later.

-- 
With regards,
Christian Walde

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