Note that assigning to certain "unassigned scalars" is legitimate, such as the one returned by substr. Unassigned scalars with set magic simply wouldn't be made read-only, of course.
But you know what else wouldn't be made read-only? "Unassigned scalars" from XS code. Making unassigned scalar *created by Perl* read-only would create inconsistencies with those created by XS code. This reduces the benefits of making any change.
In reply to Re^9: Shouldn't references be readonly? (updated)
by ikegami
in thread Shouldn't LITERAL references be readonly? (updated)
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |