<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
did purdue-pm discuss this new feature of perl 5.20 already? See
<a class="moz-txt-link-freetext" href="http://perltricks.com/article/68/2014/2/13/Cool-new-Perl-feature--postfix-dereferencing">http://perltricks.com/article/68/2014/2/13/Cool-new-Perl-feature--postfix-dereferencing</a>
for some examples, and for some deeper discussion of the why
(especially the digram in number 3). There was a lot of discussion,
mostly negative, when this was announce, for instance
<a class="moz-txt-link-freetext" href="http://www.perlmonks.org/?node_id=1064016">http://www.perlmonks.org/?node_id=1064016</a>. The comment by BrowserUK
is particularly good (below)<br>
<br>
<ul class="indent" style="color: rgb(0, 0, 0); font-family: 'Times
New Roman'; font-size: medium; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">
<p>Weird isn't it how differently people perceive particular
syntaxes. I find the (long form) dereference syntaxes completely
consistent and eminently readable (provided they are formatted
correctly; which is short-hand for saying: the way I do it :)</p>
<ul>
<li><tt class="inlinecode">${ <thing> }</tt>: reference
thing as a scalar.</li>
<li><tt class="inlinecode">@{ <thing> }</tt>: reference
thing as an array.</li>
<li><tt class="inlinecode">%{ <thing> }</tt>: reference
thing as a hash.</li>
</ul>
<p>The internal whitespace around thing is imperative IMO, and
with it, it is (I find it) totally clear, concise and
consistent. The three holy Cs of syntax.</p>
<p>Personally, I would much rather have seen the short-forms (<tt
class="inlinecode">$$ref</tt>,<span
class="Apple-converted-space"> </span><tt class="inlinecode">@$ref</tt><span
class="Apple-converted-space"> </span>&<span
class="Apple-converted-space"> </span><tt class="inlinecode">%$ref</tt>)
removed than have another, less concise, less orthogonal, less
consistent, less in-keeping-with syntax, added.</p>
<p>Hm. That last part isn't quite right; let me try that again.</p>
<ol>
<li>Pointlessly more verbose.</li>
<li>Totally arbitrary.</li>
<li>Utterly inconsistent (with anything).</li>
<li>Confused and confusing.</li>
<li>Completely out of keeping.</li>
<li>Muddled and muddling.</li>
<li>Like fitting a wing mirror to your garden shed.</li>
</ol>
<p>Simply the pointless, capricious, because-we-can assertion of
the ability to foist whimsy on us muggles. Of course, no one has
to use it; but some will, and thus the damage is done.</p>
<p>In short, exactly what has gone wrong with p5p for the last few
years.<br>
</p>
<p><br>
</p>
</ul>
his point is backed up by dmitri who says<br>
<table id="replies_table" style="font-family: 'Times New Roman';
letter-spacing: normal; orphans: auto; text-indent: 0px;
text-transform: none; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(0, 0, 102);"
cellpadding="1" cellspacing="1" border="0" width="100%">
<tbody>
<tr class="reply-body pmnote-41527" style="color: rgb(0, 0, 0);
background-color: rgb(255, 255, 255);" bgcolor="ffffff">
<td class="reply-body" style="color: rgb(0, 0, 0);
background-color: rgb(255, 255, 255);">
<ul class="indent">
<ul class="indent">
From the documentation (one of the links in the parent):
<ul>
<i>This syntax allows dereferencing to be written and
read entirely left-to-right.</i>
</ul>
Which is something I haven't paid attention to. I'd be
willing to give this a try.
</ul>
</ul>
</td>
<td class="reply-body adjunct-links" style="color: rgb(0, 0,
0); font-size: smaller; background-color: rgb(255, 255,
255);" align="left" valign="bottom"><a
href="http://www.perlmonks.org/?parent=1067164;node_id=3333"
style="color: rgb(51, 51, 153);">[reply]</a></td>
</tr>
<tr class="reply" bgcolor="#eeeeee">
</tr>
</tbody>
</table>
<br class="Apple-interchange-newline">
A final point, which relates to what we talked about last week,
Davido says, and I agree<br>
<ul class="indent" style="color: rgb(0, 0, 0); font-family: 'Times
New Roman'; font-size: medium; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<p>This is an idea that sounds good in principle, and that is
destined to turn out not so good. Problems:</p>
<ul>
<li>Additional complexity introduced to the Perl code base will
undoubtedly lead to a new round of bug-fixes.</li>
<li>A new syntax that will begin to creep into modules and new
code that push forward the minimum Perl version without
significant benefit.</li>
<li>A new set of special cases. I can see it now in<span
class="Apple-converted-space"> </span><u>Intermediate Perl</u>:
"You may omit the<span class="Apple-converted-space"> </span><tt
class="inlinecode">-></tt><span
class="Apple-converted-space"> </span>operator between
subscripts, but not between a reference and its flattener</li>
<li>If<span class="Apple-converted-space"> </span><tt
class="inlinecode">@{ $aref->[1] }</tt><span
class="Apple-converted-space"> </span>is ugly, is<span
class="Apple-converted-space"> </span><tt class="inlinecode">$aref->[1]->@*</tt><span
class="Apple-converted-space"> </span>prettier? At least the
first seems mostly symmetrical, and visually distinctive. And
it has the benefit of putting the most important thing first;
we're generating a list. Beauty is in the eye of the beholder,
but you would have to be an alien to find more beauty in the
new construct than in the symmetry of the old one. Why do we
need to put the most important part at the end? Discomforting,
it is.</li>
<li>It doesn't make simple things easy, or hard things possible.
And it<span class="Apple-converted-space"> </span><em>really</em><span
class="Apple-converted-space"> </span>doesn't make
impossible things possible. The barrier to entry into Perl
syntax really ought to be, "Does it make hard things possible?
Does it at least make simple things easier?"</li>
</ul>
<p>TIMTOWTDI doesn't mean we need to add every imaginable
syntactic alternative.</p>
</ul>
<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
Michael Gribskov
Hockmeyer Hall of Structural Biology
Department of Biological Sciences
Purdue University
240 S. Martin Jischke Drive
West Lafayette, IN 47907-1971
<a class="moz-txt-link-abbreviated" href="mailto:gribskov@purdue.edu">gribskov@purdue.edu</a> vox: 765.494.6933 fax: 765.496.1189
calendar: <a class="moz-txt-link-freetext" href="http://www.google.com/calendar/embed?src=mgribskov%40gmail.com">http://www.google.com/calendar/embed?src=mgribskov%40gmail.com</a>
</pre>
</body>
</html>