On Fri, Nov 08, 2002 at 08:22:17PM +1100, Damian Conway wrote:
> Billy Naylor asked:
> 
> > Would it be useful to apply memoization in a similar fashion...
> > 
> >   sub square ( Num $n ) is memo {
> >     return $n ** $n;
> >   }
> 
> Yes. Larry indicated this in A2
> (see http://search.cpan.org/perl6/apo/A02.pod#Properties).
> 
> The name of the property is still under debate. Larry favours:
> 
>       sub square ( Num $n ) is same {...}
> 
> whereas others feel that:
> 
>       sub square ( Num $n ) is memoized {...}
> 
> is more appropriate.

We're looking for a word that tersely expresses 
has_no_side_effects_and_can_safely_have_its_results_cached_based_on_parameter_types_and_values_and_calling_context
 ?

And to people in the perl5 know, Memoize is the module that implements this,
hence why people who know of how and what Memoize can do favour that name.
Except that it's not necessarily obvious to everyone else?
cacheable is rather long and sufficiently made up that my copy of ispell
doesn't recognise it. But at least all English speakers can agree how to
spell words that don't end in i[zs]e (or end ou?r or [cs]e :-)

Nicholas Clark

Reply via email to