Brad Anderson:

immutable bool[256] tab3 =
   ubyte
   .max
   .iota!"[]"

I can't decide if this part is brilliant or terrible. Clever, either way.

That iota enhancement has nothing terrible: the "[]" syntax is already used in Phobos for std.range.uniform, and it's quite needed, otherwise it can't generate the right bound of a type (like the last ubyte, last byte, last char, last int, etc).

Bye,
bearophile

Reply via email to