Congratulations to the D Team!

Timon Gehr timon.gehr at gmx.ch
Tue Jul 10 18:07:28 PDT 2012


On 07/11/2012 03:04 AM, Timon Gehr wrote:
> On 07/11/2012 02:03 AM, Walter Bright wrote:
>> ...
>> So do I. But all language design involves tradeoffs. I believe the
>> advantages of const toHash etc. outweigh the disadvantage of less
>> straightforward memoization.
>>
>
> I use unbounded data structures. Those have to be initialized lazily
> and therefore the non-constness of their methods invades the entire
> code base which is written in OO and functional styles (and a good
> portion of Metaprogramming to remove the boilerplate). Most methods
> that would be considered const cannot be, because they may trigger
> extensions of the unbounded data structures somewhere down the road.
>

(conceptually, the structures are immutable and infinite.)


More information about the Digitalmars-d mailing list