Someone on this list (TomC?) has supplied a major diatribe against const.

<chaim>

>>>>> "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

Reply via email to