On Saturday, 11 June 2016 at 11:15:43 UTC, ArturG wrote:
On Saturday, 11 June 2016 at 09:07:43 UTC, Andrei Alexandrescu
No, both are nice to have. If one name is needed for both,
"args" is indeed a good commonality. "Invoke function f with
these args" and "Construct an object of type T with these
args". The problem is it's not very intuitive in usage.
Perhaps "call" for functions and "make" for objects are
better. If we add these to std.experimental.functional and
std.experimental.conv and they get a lot of usage we might
make a small change to the language.
would'nt it be possible to take the type as a runtime param
and support struct, class and all callables?
Taking an address creates a function pointer, which loses the
argument names. (Doesn't it?)