Getting the const-correctness of Object sorted once and for all

Alex Rønne Petersen xtzgzorex at gmail.com
Sun May 13 12:39:19 PDT 2012


On 13-05-2012 21:11, Stewart Gordon wrote:
> On 13/05/2012 18:53, Alex Rønne Petersen wrote:
> <snip>
>> Which forces you to:
>>
>> 1) use an AA lookup
>> 2) use the GC
>>
>> Not an optimal solution IMHO.
>
> But you're going to need to use the GC anyway. How else are you going to
> store the string?

malloc? (And free it in the destructor or whatever - depends on your 
manual memory management approach.)

>
> Memoization is a form of laziness. This concept applies to the
> allocation of memory to hold the result as much as to the actual
> calculation of the result.
>
> Stewart.

-- 
- Alex


More information about the Digitalmars-d mailing list