byKey and byValue: properties or methods?

Martin Nowak dawg at dawgfoto.de
Wed Jan 18 00:38:41 PST 2012


On Tue, 17 Jan 2012 22:13:49 +0100, Peter Alexander  
<peter.alexander.au at gmail.com> wrote:

> On 17/01/12 6:48 AM, Andrei Alexandrescu wrote:
>> I hate I must ask this:
>>
>> int[string] aa;
>> foreach (k; aa.byKey) { ... }
>>
>> or
>>
>> int[string] aa;
>> foreach (k; aa.byKey()) { ... }
>>
>>
>>
>> Thanks,
>>
>> Andrei "I told you" Alexandrescu
>
> byKey(aa)
>
> Roll a dice, choose one at random.
>
> The only thing properties are good for is distracting us from tabs vs.  
> spaces debates, and other really, really important matters.

But the current compiler behavior is really annoying.
Either nobody should use enforced properties or it should
be part of the standard warning level.


More information about the Digitalmars-d mailing list