develooper Front page | perl.perl5.porters | Postings from March 2015

Re: [perl #123898] [PATCH] Modernize the second part of perldsc.pod.

Thread Previous
From:
Ricardo Signes
Date:
March 3, 2015 01:08
Subject:
Re: [perl #123898] [PATCH] Modernize the second part of perldsc.pod.
Message ID:
20150303010800.GA16948@cancer.codesimply.com
* Shlomi Fish via RT <perlbug-followup@perl.org> [2015-02-26T02:38:21]
> Sorry, that was an awkward phrasing on my part. I meant that I wanted to
> remove a paragraph which warned about doing exactly that and that it was
> considered still relevant, and was vetoed against. I'm referring to:

Thanks, this helped.  Sorry for my delayed reply, I had this message open in a
tab waiting for when I could read all the bits and pieces relevant to it at
once.

I agree:  there are a couple things in conflict here.  Here is my thinking:

Tom's summary is:

  $AoA[$i] = [ @array ];   # usually best
  $AoA[$i] = \@array;      # perilous; just how my() was that array?
  @{ $AoA[$i] } = @array;  # way too tricky for most programmers

The question about whether to use \@array is about how certain you are that the
array is truly lexical.  On one hand, you might say that in this example, it is
painfully obvious that @array is lexical.  On the other, you can say that it's
best to stop worrying about accounting for obviousness, and just pick the safe
option.  Tom's advice is the latter, at least for beginners.

I think perldsc is largely a document for beginners.  Let's stick with [ @tmp ]
here, for the sake of consistency.  It isn't what I'd really write, but not
everything in the document has to be.

Possibly your previous patch can be revisited to separate things out.  I might
be more amenible to something cautioning one to be careful when taking
references, but just removing the the objection to using backslash is too much.
(There were other changes in there that I thought were unjustified and
unrelated, too.)

-- 
rjbs

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About