On Tue, Oct 30, 2001 at 09:37:39AM -0500, Aaron Sherman wrote:
: Yep, but in Perl5, this was never very clean or obvious to the
: casual programmer. Constants have been coming of age in Perl,
: and they're kind of scary if they're not constant.

On one hand, one might say that a developer changing a constant's
binding in order to change its value is probably doing so because he
knows what he's doing.  As I understand things, constants are really
just read-only variables.  Do we necessarily want to make a special case
out of them and make the variable read-only as well as locking down the
symbol itself against re-binding?

On the other hand, I can see sloppy code where a developer might be
doing a bunch of variable aliasing with passed arguments, and might
inadvertantly change a constant.  Is it possible maybe to throw a warning
if warnings are enabled if a constant's symbol is changed like this?

Just my thoughts, and I'm not 100% sure they're sensical.

David

-- 
 == David Nesting WL7RO Fastolfe [EMAIL PROTECTED] http://fastolfe.net/ ==
 fastolfe.net/me/pgp-key A054 47B1 6D4C E97A D882  C41F 3065 57D9 832F AB01

Reply via email to