>>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:

DS> At 10:58 AM 8/11/00 -0400, Chaim Frenkel wrote:
>> Someone on this list (TomC?) has supplied a major diatribe against const.

DS> Maybe, but I don't see what's wrong with:

DS> my $foo :const = 12;

DS> A nice, named, lexically scoped constant. The optimizer should be able to 
DS> make reasonably good use of that.


Err, I was addressing the issue of having 

        const this
        this const
        sub foo ($name :const)

etc.

A nice way of making a value read-only is lovely. And let it be a
runtime error to modify it.

The caller can easily do a &foo eval{$const_item} to remove the
read-only attribute.

Hmm, perhaps we should rename the attribute
        :read-only

<chaim>
-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to