On Fri, 11 Aug 2000, Andy Wardley wrote:

> > Spinning off from Larrys syntactic comment and Mike
> > Pastores example, how about some of the following:
> 
> How about any variable created in UPPER case is a constant?  
> 
> Quite restrictive, and likely to screw many things up, admittedly,
> but it's an easy rule to remember and one which is generally 
> considered good programming practice.  ISTR it's what Ruby 
> uses.  It works well for all those Perl-provided variables 
> (e.g. $ME) that *should* be read-only, but not so good for those 
> that are supposed to be read/write (e.g. @INC).

Or perhaps merely a new identifier, ie:

$:pi = 3.1459;                # constant pi
%:struct = (                  # constant struct
        :Name => 'Jack',      # constant key (I got tired of Jane)
        Age => 32,            # mutable key
        :Birthday => '08/15'
);

what about:

$!foo = 'immobile';    # mnemonic, NOT as in NOT change
$'bar = 'unchanging';  # klingon?
$.zot = 'static';

Foo for thought.

--
Mike Pastore
[EMAIL PROTECTED]


Reply via email to