in reply to Re: Why doesn't the angle operator localize $_
in thread Why doesn't the angle operator localize $_
Thanks to all for the helpful, insightful replies. I would, however, like to comment a bit on the relationship of localization to aliasing. It seems to me (without knowing the implementation details) that localization in such a while loop need not imply aliasing as with for. The angle operator semantics are already different than for with regards to $_, so I wouldn't weep for consistency. Instead of aliasing, $_ could simply be localized to a temporary value that could repeatedly be assigned the results of IO. Therefore, I don't understand why the inappropriateness of aliasing would have ever precluded while being written in this way in the first place. I thoroughly understand, however, why the weight of history precludes a change. Nevertheless, I find myself a bit disappointed in this difference between for and while when I consider that these operators are often treated as completely interchangeable, by the naive.
,welchavw
|
|---|