between and among: worth Phobosization?

Dmitry Olshansky dmitry.olsh at gmail.com
Tue Dec 17 10:47:11 PST 2013


17-Dec-2013 22:16, Andrei Alexandrescu пишет:
> On 12/17/13 9:17 AM, Andrej Mitrovic wrote:
>> On 12/17/13, Byron <byron.heads at gmail.com> wrote:
>>> I don't know why we can't do this instead:
>>>
>>> if (foo in ["alpha", "beta", "delta"] ) {
>>
>> You can come pretty close with:
>>
>> if (foo in A["alpha", "beta", "delta"] )
>
> Wouldn't
>
> if (foo in LiteralSet("alpha", "beta", "delta"))
>
> be a ton faster?
>

Or even:
if (foo in LiteralSet!("alpha", "beta", "delta"))

>
> Andrei
>


-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list