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]
- RFC 83 (v1) Make constants look like variables Perl6 RFC Librarian
- Re: RFC 83 (v1) Make constants look like variable... Larry Wall
- Re: RFC 83 (v1) Make constants look like vari... Mike Pastore
- Re: RFC 83 (v1) Make constants look like ... Simply Hao
- Re: RFC 83 (v1) Make constants look like ... Nathan Wiger
- Re: RFC 83 (v1) Make constants look l... James Mastros
- Re: RFC 83 (v1) Make constants look like ... Steve Simmons
- Re: RFC 83 (v1) Make constants look l... Andy Wardley
- Re: RFC 83 (v1) Make constants l... Mike Pastore
- Re: RFC 83 (v1) Make constan... Philip Newton
- Re: RFC 83 (v1) Make con... Mike Pastore
- Re: RFC 83 (v1) Make constants l... Michael Fowler
- Does Perl need true constants? (... Nathan Wiger
- Re: RFC 83 (v1) Make constants look l... Jeremy Howard
- Re: RFC 83 (v1) Make constants l... Dan Sugalski
- Re: RFC 83 (v1) Make constants look like ... Damian Conway
- Re: RFC 83 (v1) Make constants look l... Steve Simmons
- Re: RFC 83 (v1) Make constants l... Larry Wall
- Re: RFC 83 (v1) Make constants look like variable... Glenn Linderman
