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.
> >>>>> "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 $spot : constant = new Dog;
> >>
>JH> Yes. But what about types and attributes within complex types?
>
>JH> - Constant refs vs refs to constants?
>JH> - Types of hash (or 'pair') keys and elements?
>JH> - Attributes (e.g. constantness) of hash keys and elements?
>JH> - Ditto for arrays/lists...
>
>JH> I left this out of v1 of the RFC because I wanted to get some feedback on
>JH> syntax. If we can flesh this out I'll incorporate it into v2.
>
>JH> Also, do we want to be able to specify types and attributes within a sub
>JH> prototype? It would be nice to guarantee that subs don't mutate particular
>JH> parameters, that certain data will not be aliased, etc, so that
>appropriate
>JH> optimisations can be done.
>
>
>
>
>
>
>--
>Chaim Frenkel Nonlinear Knowledge, Inc.
>[EMAIL PROTECTED] +1-718-236-0183
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk