handful and interval

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Sep 2 09:44:46 PDT 2012


On 9/2/12 6:22 PM, Jakob Ovrum wrote:
> On Sunday, 2 September 2012 at 14:49:34 UTC, Andrei Alexandrescu wrote:
>> On 9/2/12 4:22 PM, Andrei Alexandrescu wrote:
>> [snip]
>>
>> The alternative would be to simply define these as functions:
>>
>> if (a.among("struct", "class", "union")) { ... }
>> if (b.between(1, 100)) { ... }
>>
>>
>> Andrei
>
> I prefer this.

Me too, upon some more thought. (Interval could become a legit numeric 
library, but that's a separate idea.)

> There doesn't seem to be a clear vision for the 'in' operator. Let's not
> make the situation more complicated before we've figured that out. How
> do we know which uses of 'in' are abuse, and which are merely exploiting
> intuition justifiably?

Yah, agreed.


Andrei


More information about the Digitalmars-d mailing list