How about a Hash template?

Alexander aldem+dmars at nk7.net
Thu Apr 28 09:00:48 PDT 2011


On 28.04.2011 17:46, Andrej Mitrovic wrote:

> It works, but it makes the if statement ugly again. :)

  Well, just a bit - still much better than (var == "..." || var = "..." || var == "..." ...), don't you think so? ;)

  If compiler would support special "in" usage, automatically expanding values on the right to series of comparisons (like "var in [1,2,3,4,5]"), it would be really nice, of course :)

/Alexander


More information about the Digitalmars-d mailing list