Another approach would be to define the whole helper function in a separate module:
string input(alias VAR)(...){
return "<input name=\""~VAR.stringof~"\", value=\""~to!string(VAR)~"\">...</input>";
}
and then use it as
!= input!varname()
In contrast to the Diet solution it will have to allocate memory for the string concatenations, though.