On Tuesday, 17 December 2013 at 18:16:59 UTC, Andrei Alexandrescu wrote:

if (foo in LiteralSet("alpha", "beta", "delta"))

if "_" referred to anything undefined then you could do:

if (foo in ["alpha":_,"beta":_,"delta":_])

Side-note: LLVM actually uses a value "undef" that it uses for reasoning, so that

(x & undef) == 0
(x | undef) == -1

Kind of cute.

Or even better:

if (foo in ["alpha":-),"beta":-),"delta":-)])

Reply via email to