matovitch: > void func(V, V.type def_val) (uint i, V v) > { > if (i < v.dimension) { > v.data[i] = def_val; > } > } I think something like that is not yet possible, but maybe it will be possible later. Your code has also allowed me to find a new small compiler bug that I have just filed: http://d.puremagic.com/issues/show_bug.cgi?id=10346 Bye, bearophile