Math functions take combined vector and scalar inputs

Would be nice if built-in math functions could combine vector and scalar inputs in the same way that the intrinsic math functions do. For example, you can combine a float4 and a float with + - * / but pow(myfloat4, myfloat) gives an error where it could do the obvious thing instead. Same for powr, pown, rootn, min, max, remainder, mad, and possibly others.

Also, it would be nice if we could write new functions that take arbitrary vector lengths.
For example: T square(T x) { return x * x; }
This would avoid needing multiple versions of the same function for different vector lengths, when we don’t want to use macros. I realize this is going in the direction of C++ which might be to much of a change, but had to ask…