Chaim Frenkel wrote:
> 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
>
Can't we make a value 'tr
At 05:09 PM 8/11/00 -0400, Chaim Frenkel wrote:
>Hmm, perhaps we should rename the attribute
> :read-only
Works, though I like "constant" (or const, that's OK) just as much.
Might be worth having a way to set things to read-only temporarily, too.
Won't help the optimizer, but it could k
> "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 con
At 10:58 AM 8/11/00 -0400, Chaim Frenkel wrote:
>Someone on this list (TomC?) has supplied a major diatribe against const.
Maybe, but I don't see what's wrong with:
my $foo :const = 12;
A nice, named, lexically scoped constant. The optimizer should be able to
make reasonably good use of that.
Someone on this list (TomC?) has supplied a major diatribe against const.
> "JH" == Jeremy Howard <[EMAIL PROTECTED]> writes:
JH> Dan Sugalski wrote:
>> The syntax is actually:
>>
>> my type $varname;
>>
>> This is in perl 5.6.0. Modifiers go as attributes after the colon:
>>
>> my Dog
At 02:29 PM 8/11/00 +1000, Jeremy Howard wrote:
>Dan Sugalski wrote:
> > The syntax is actually:
> >
> >my type $varname;
> >
> > This is in perl 5.6.0. Modifiers go as attributes after the colon:
> >
> > my Dog $spot : constant = new Dog;
> >
>Yes. But what about types and attributes within
Dan Sugalski wrote:
> The syntax is actually:
>
>my type $varname;
>
> This is in perl 5.6.0. Modifiers go as attributes after the colon:
>
> my Dog $spot : constant = new Dog;
>
Yes. But what about types and attributes within complex types?
- Constant refs vs refs to constants?
- Types o
On Thu, 10 Aug 2000, Decklin Foster wrote:
> Syloke Soong <[EMAIL PROTECTED]> writes:
>
> > my $varname type;
>
> The syntax
>
> my $varname : constant; # pun not intended :)
>
> Was brought up earlier (but probably not before this RFC was written).
> Perhaps something similar could
Syloke Soong <[EMAIL PROTECTED]> writes:
> my $varname type;
The syntax
my $varname : constant; # pun not intended :)
Was brought up earlier (but probably not before this RFC was written).
Perhaps something similar could be used for the sake of consistency.
> if ($somecond