|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re^2: Commonly accepted style guide?by Anonymous Monk |
| on Sep 26, 2005 at 09:25 UTC ( #495039=note: print w/ replies, xml ) | Need Help?? |
|
If I see @n[$i] I get very worried. I don't. It's about time we got rid of that warning. It's going to be the right syntax in perl6, it's doing the right thing in perl5, and considering that: return 4, 3, and 2 element slices - the use of @n[$i] isn't unnatural at all. Its a one element slice. And what does a slice in scalar context return? It's last element. Which, obviously, is $n[$i]. So, I think in this case that Perl should act perlish, and shut up and DWIM (which it is doing already). And not whine and pretent to be Java or Python.
In Section
Meditations
|
|
||||||||||||||||||||||