Joe Atzberger wrote:

> Case in point though, here I agree it is better to add
> a variable rather than assign to $_.  But more broadly,
> coding to avoid $_ altogether is working against the
> language unnecessarily and, imho, unproductively.

Said this way, it looks like it's a hard thing to figure out how to avoid using 
$_. But it's not. It's even the opposite: often it's harder figuring out how to 
use it. We're not forced of using $_ just because we can do it. In nested 
constructs, unless you explicitly scope it using my $_, the brain will always 
need more efforts to determine on which $_ we are working. It is definatly 
simpler to use iterators in this case. It does not go against the language, 
iterator variables are perfectly supported and encouraged. Even in simple 
loops, it's nothing of a challenge and on the long run will prove to be 
productive in more complex code.

Sébastien
_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-devel

Reply via email to