between and among: worth Phobosization?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Dec 17 10:16:58 PST 2013


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?


Andrei



More information about the Digitalmars-d mailing list