Wiggins d'Anconia wrote:
Scott R. Godin wrote:
On Jul 19, 2005, at 5:19 PM, Wiggins d'Anconia wrote:
Close. You want a hash slice.

@[EMAIL PROTECTED] = @vals;

A marvelously Perlish construct.

basically it's shorthand for the more obvious and well documented
@{$reference} notation.
[snip]
Personally I feel the shorthand way makes it slightly more difficult WRT
maintenance. Fine for one-offs but for long term multiline code, the
long form would likely be preferable as it makes it easier to see just
exactly what's going on there.

I recognize that you said "Personally I feel..." so there is certainly
nothing wrong. I will counter that the additional {} just add clutter
where it isn't needed. Another example is parentheses around function
arguments that don't require them. I am not a key stroke counter, but
adding the grouping where it isn't necessary *can* (not "does" for
everyone) make it much more difficult to read because you have to
constantly see where you are matched to.

OTOH, it makes it very clear to me that I'm dereferencing a reference to something, and that it isn't a typo introducing (some|more) line-noise :-)

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



Reply via email to