On Friday, 17 February 2017 at 04:09:14 UTC, timotheecour wrote:
* with(module_!"std.foo") is useful for scoping imports to
cover several declarations and being DRY; at the expense of
adding indentation/nesting and less nice syntax
Doesn't add indentation:
with (module_!"std.stdio, std.traits")
void fun(T)(File input, T value)
if (isIntegral!T);
with/module_ solves the UFCS member stand-in problem elegantly,
how does your proposal solve it?:
with (module_!"std.range.primitives")
void func(alias pred, R)(R range)
if (isInputRange!R && is(typeof(pred(range.front)) == bool);
.front has to refer to *either* a member or an imported UFCS
function.