Stupid little iota of an idea

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Feb 9 05:55:59 PST 2011


On 2/9/11 7:54 AM, Nick Sabalausky wrote:
> "spir"<denis.spir at gmail.com>  wrote in message
> news:mailman.1423.1297254917.4748.digitalmars-d at puremagic.com...
>>
>> PS: your proposal would also logically allow, I guess, expressions like (n
>> in min..max). Would love it.
>>
>
> Unfortunately, not unless "in" was changed to allow "{expr} in {range}". And
> from prior discussions of "in", I seem to remember Walter and Andrei are
> strongly against allowing "in" to be used to check for element values rather
> than just AA keys.
>
> But Andrei did recently propose an "any", IIRC, that would allow something
> like what you're suggesting.

a in iota(min, max) is a O(1) operation so it could be allowed.

Andrei



More information about the Digitalmars-d mailing list