On Tuesday 21 Jun 2011 18:19:04 Kirk wrote:
> [snip]
> 
> If a function can be substituted with a constant return it wasn't much of a
> function was it.. and again, having an object take responsibility for it's
> internal state takes care of a lot of problems. Just look at actors.
> 
> Regards,
> Kirk
> 

Not trying to speak for Kevin, but I assume he was talking about memoization 
of functions, not functions that returned a constant. 

I've found attempting this effect with several objects is more elegant if you 
can rely on the objects being side-effect-free and "wrapping" them with 
memoization behaviour, rather than implementing it in the internals of each 
object. Again, this is more a concern of readability and reasoning than 
performance, particularly where disk/network IO is the likely performance 
hindrance.

Kind regards,
Graham

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to