At 11:07 AM 8/12/00 +1000, Jeremy Howard wrote:
>My current thinking is that a ref to a constant should only be possible
>through creating a constant first, and then creating a reference to that
>separately.

What, like:

   $foo = \5'

which you can do in perl 5 right now. (Basically a scalar's created 
(probably), given the value '5', and marked read-only)

>  I'm still unsure of array and hash elements, however. Using the
>':' in this way has the potential to cause ambiguity with list generation
>syntax (RFC 81), and add complexity where there may not be much payoff.

If you want individual elements of hashes or arrays to be read-only, that's 
OK, though I can see that complicating things.

And constants, of course, may well be substituted for in the bytestream 
anyway--if you write:

   my $foo : const = 5;
   $bar = $foo;

you may well get:

   $bar = 5;

under the hood.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to