Hello Jordi,
On 11/21/2010 02:43 AM, Michel Fortin wrote:
On 2010-11-20 09:21:04 -0500, Peter Alexander
<peter.alexander...@gmail.com> said:
D does not support logical const due to the weak guarantees that it
provides.
So, without logical const, how are D users supposed to provide lazy
evaluation and memoization in their interfaces, given that the
interface should *seem* const, e.g.
[...]
Using a static associative array as a cache will work:
[...]
I am also interested in what is the D way of doing this. The
associative array approach is not suitable for the case of 4x4
matrices in a 3D application where you can have thousonds of them.
At some point, the associative array lookup will be more expensive
than the actual calculation.
Cache eviction?